diff --git a/mamweb/settings_common.py b/mamweb/settings_common.py index d6ed2852..d5b35281 100644 --- a/mamweb/settings_common.py +++ b/mamweb/settings_common.py @@ -87,7 +87,6 @@ TEMPLATES = [ 'django.contrib.auth.context_processors.auth', 'django.template.context_processors.request', 'django.contrib.messages.context_processors.messages', - 'sekizai.context_processors.sekizai', 'header_fotky.context_processors.vzhled', 'various.context_processors.rozliseni', 'various.context_processors.april', @@ -110,7 +109,6 @@ INSTALLED_APPS = ( 'django.contrib.auth', # Utilities - 'sekizai', 'reversion', 'django_countries', 'solo', @@ -120,9 +118,6 @@ INSTALLED_APPS = ( 'dal', 'dal_select2', - 'crispy_forms', - 'django_comments', - 'django.contrib.flatpages', 'django.contrib.humanize', diff --git a/mamweb/static/css/mamweb.css b/mamweb/static/css/mamweb.css index 84e4c79b..e6839727 100644 --- a/mamweb/static/css/mamweb.css +++ b/mamweb/static/css/mamweb.css @@ -199,15 +199,6 @@ h1 { margin-top: 0px; } - - -/* Comments */ - -#id_comment { - width: 100%; - height: 6em; -} - /* Headline & Header */ #title { /*dělá blbosti šířka, je to kvůli fixed pozici, zatím natvrdo, vyřešit*/ diff --git a/mamweb/templates/base.html b/mamweb/templates/base.html index 4281c6df..a29d4697 100644 --- a/mamweb/templates/base.html +++ b/mamweb/templates/base.html @@ -1,4 +1,4 @@ -{% load static sekizai_tags %} +{% load static %} {% load sitetree %} @@ -7,7 +7,6 @@ {% block title %}{% block nadpis1a %}🦊{% endblock %} | Korespondenční seminář M&M{% endblock title %} -{# {% render_block css %}#} {% block custom_css %}{% endblock %} @@ -189,6 +188,6 @@ walkText(document.body); {% endif %} - {% render_block "js" %} + {% block js %}{% endblock %} diff --git a/mamweb/urls.py b/mamweb/urls.py index 9ef2750a..cdd7df09 100644 --- a/mamweb/urls.py +++ b/mamweb/urls.py @@ -13,7 +13,6 @@ Soubor sloužící jako základní „router“, tj. zde se includují veškeré - :mod:`api.urls` - :mod:`treenode.urls` - :mod:`aesop.urls` -- ``comments_dj/`` :mod:`django_comments.urls` """ from django.urls import path, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns @@ -62,9 +61,6 @@ urlpatterns = [ # Aesop (ma vlastni podadresare) path('', include('aesop.urls')), - # Comments (interni i verejne) - path('comments_dj/', include('django_comments.urls')), - # REST API # path('api/', include(router.urls)), diff --git a/requirements.txt b/requirements.txt index 53c528ab..6855e0ae 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,43 +1,31 @@ -c constraints.txt # basic libs -psycopg2 -html5lib -ipython +psycopg2 # PostgreSQL adaptér +ipython # Interaktivní shell +Unidecode # Přepisuje unicode do ASCII (např. soubory nebo e-maily) Pillow pilkit>=3.0 # Kvůli kompatibilitě s Pillow>=10.0.0 -pytz -six -pexpect -traitlets -Unidecode # Django and modules Django<5.0 #django-bootstrap-sass -django-mptt -django-reversion -django-sekizai -django-countries -django-solo -django-ckeditor +django-reversion # Version control na datech v databázi +django-countries # Políčko ve formu / field v modelu ohledně států +django-solo # Singleton model (speciálně Nastavení) +django-ckeditor # Editor htmlka (hlavně v adminu u flatpages) django-cleanup # Uklízí media/ od smazaných „databázových“ souborů -django-flat-theme -django-taggit -django-autocomplete-light>=3.9.0 -django-crispy-forms -django-imagekit -django-polymorphic -django-sitetree -django_reverse_admin +django-taggit # Taggy v djangu (speciálně zaměření problémů) +django-autocomplete-light>=3.9.0 # Automatické doplňování (problémů, účastníků, …) ve formulářích +django-imagekit # Všechny možné obrázky v Djangu +django-polymorphic # Polymorfismus na django modelech (hlavně Problém nebo treenode) +django-sitetree # Struktura stránek, hlavně pro meníčko +django_reverse_admin # Lepší handlování OneToOne fieldů v adminu django-rest-framework django-webpack-loader django-rest-polymorphic -# Comments -django-contrib-comments - # debug tools/extensions django-debug-toolbar diff --git a/seminar/templates/seminar/archiv/problem.html b/seminar/templates/seminar/archiv/problem.html index 1aa94219..cae8f56c 100644 --- a/seminar/templates/seminar/archiv/problem.html +++ b/seminar/templates/seminar/archiv/problem.html @@ -1,7 +1,5 @@ {% extends "base.html" %} -{% load comments %} - {% block content %}
{% block problem %} @@ -13,10 +11,6 @@

Text - org

{{ problem.text_org |safe }} -

Diskuse - org

- {% render_comment_list for object %} - {% render_comment_form for object %} -
{% endif %} diff --git a/seminar/templatetags/utils.py b/seminar/templatetags/utils.py index 4ba33a0e..ca400050 100644 --- a/seminar/templatetags/utils.py +++ b/seminar/templatetags/utils.py @@ -1,7 +1,6 @@ from django import template from django.utils.safestring import mark_safe from datetime import datetime, timedelta -from pytz import timezone from mamweb.settings import TIME_ZONE import logging register = template.Library() diff --git a/seminar/testutils.py b/seminar/testutils.py index 7076d5f0..c3d64f56 100644 --- a/seminar/testutils.py +++ b/seminar/testutils.py @@ -4,7 +4,6 @@ import datetime from django.contrib.auth.models import Permission from django.contrib.auth.models import Group -from pytz import timezone import random import lorem import django.contrib.auth @@ -177,13 +176,13 @@ def gen_organizatori(rnd, osoby, last_rocnik): year=1993 + pusobnost, month=rnd.randint(1, 12), day=rnd.randint(1, 28), - tzinfo=timezone('CET'), + tzinfo=datetime.timezone.utc, ) do = datetime.datetime( year=od.year + rnd.randint(1, 6), month=rnd.randint(1, 12), day=rnd.randint(1, 28), - tzinfo=timezone('CET'), + tzinfo=datetime.timezone.utc, ) #aktualni organizatori jeste nemaji vyplnene organizuje_do diff --git a/treenode/templates/treenode/orphanage.html b/treenode/templates/treenode/orphanage.html index 6408749e..53d4ed67 100644 --- a/treenode/templates/treenode/orphanage.html +++ b/treenode/templates/treenode/orphanage.html @@ -1,19 +1,10 @@ {% extends "seminar/archiv/base.html" %} {% load static %} -{% load sekizai_tags %} - -{# toto z nejakeho duvodu nefunguje #} -{% addtoblock css %} -dfsdfs - -{% endaddtoblock "css" %} {% block custom_css %} {% endblock custom_css %} -{% load comments %} - {% block content %}