From f457520d7da9185122f366e8942bbea27a28f4e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Mon, 30 Oct 2023 23:33:13 +0100 Subject: [PATCH 1/4] =?UTF-8?q?Takhle=20u=C5=BE=20by=20=C5=A1lo=20pustit?= =?UTF-8?q?=20(ugettext->gettext,=20force=5Ftext->force=5Fstr)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aesop/ovvpfile.py | 4 ++-- aesop/utils.py | 4 ++-- aesop/views.py | 2 +- galerie/models.py | 1 - korektury/models.py | 1 - korektury/views.py | 1 - prednasky/models.py | 1 - requirements.txt | 2 +- seminar/views/views_all.py | 2 +- 9 files changed, 7 insertions(+), 11 deletions(-) diff --git a/aesop/ovvpfile.py b/aesop/ovvpfile.py index 4d58af35..ba0873f1 100644 --- a/aesop/ovvpfile.py +++ b/aesop/ovvpfile.py @@ -1,5 +1,5 @@ from django.http import HttpResponse -from django.utils.encoding import force_text +from django.utils.encoding import force_str class OvvpFile: @@ -20,7 +20,7 @@ class OvvpFile: yield '\t'.join(self.columns) + '\n' # rows for r in self.rows: - yield '\t'.join([force_text(r[c]) for c in self.columns]) + '\n' + yield '\t'.join([force_str(r[c]) for c in self.columns]) + '\n' def to_string(self): return ''.join(self.to_lines()) diff --git a/aesop/utils.py b/aesop/utils.py index 3ea62dce..58b170ec 100644 --- a/aesop/utils.py +++ b/aesop/utils.py @@ -1,6 +1,6 @@ import datetime -from django.utils.encoding import force_text +from django.utils.encoding import force_str from aesop.ovvpfile import OvvpFile @@ -9,7 +9,7 @@ def default_ovvpfile(event, rocnik): of = OvvpFile() of.headers['version'] = '1' of.headers['event'] = event - of.headers['year'] = force_text(rocnik.prvni_rok) + of.headers['year'] = force_str(rocnik.prvni_rok) of.headers['date'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") of.headers['id-scope'] = 'mam' of.headers['id-generation'] = '1' diff --git a/aesop/views.py b/aesop/views.py index 4d1748b7..e4b3364b 100644 --- a/aesop/views.py +++ b/aesop/views.py @@ -8,7 +8,7 @@ from django.shortcuts import get_object_or_404 from django.http import HttpResponse from django.urls import reverse from django.views import generic -from django.utils.encoding import force_text +from django.utils.encoding import force_str from .utils import default_ovvpfile from seminar.models import Rocnik, Soustredeni diff --git a/galerie/models.py b/galerie/models.py index 8e6efdc7..78551969 100644 --- a/galerie/models.py +++ b/galerie/models.py @@ -2,7 +2,6 @@ from django.db import models #from django.db.models import Q -from django.utils.encoding import force_text from imagekit.models import ImageSpecField from imagekit.processors import ResizeToFit, Transpose diff --git a/korektury/models.py b/korektury/models.py index 8906c00c..c9d47dfa 100644 --- a/korektury/models.py +++ b/korektury/models.py @@ -16,7 +16,6 @@ import os from django.db import models from django.utils import timezone from django.conf import settings -from django.utils.encoding import force_text from django.core.exceptions import ObjectDoesNotExist from django.utils.functional import cached_property from django.utils.text import get_valid_filename diff --git a/korektury/views.py b/korektury/views.py index 564e1331..1bdfaa92 100644 --- a/korektury/views.py +++ b/korektury/views.py @@ -5,7 +5,6 @@ třídy většinou rozšiřující nějakou třídu z :mod:`django.views.generic """ from django.shortcuts import get_object_or_404, render from django.views import generic -from django.utils.translation import ugettext as _ from django.conf import settings from django.http import HttpResponseForbidden from django.core.mail import EmailMessage diff --git a/prednasky/models.py b/prednasky/models.py index 50c71984..dcf44cbc 100644 --- a/prednasky/models.py +++ b/prednasky/models.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from django.db import models -from django.utils.encoding import force_text from seminar.models import Organizator, Soustredeni diff --git a/requirements.txt b/requirements.txt index d51645de..53c528ab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ Unidecode # Django and modules -Django<3.3 +Django<5.0 #django-bootstrap-sass django-mptt django-reversion diff --git a/seminar/views/views_all.py b/seminar/views/views_all.py index 8e71fed3..318eee21 100644 --- a/seminar/views/views_all.py +++ b/seminar/views/views_all.py @@ -3,7 +3,7 @@ from django.http import HttpResponse from django.urls import reverse from django.core.exceptions import ObjectDoesNotExist from django.views import generic -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.http import Http404 from django.db.models import Q, Sum, Count from django.views.generic.base import RedirectView From 6fe9beb0f0df44a8692c916e6c6732e285c0d2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Tue, 31 Oct 2023 21:20:48 +0100 Subject: [PATCH 2/4] =?UTF-8?q?Deprecated=20v=C4=9Bci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mamweb/settings_common.py | 1 - seminar/migrations/0006_problem_add_timestamp.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/mamweb/settings_common.py b/mamweb/settings_common.py index 71bae132..d6ed2852 100644 --- a/mamweb/settings_common.py +++ b/mamweb/settings_common.py @@ -28,7 +28,6 @@ APPEND_SLASH = True LANGUAGE_CODE = 'cs' TIME_ZONE = 'Europe/Prague' USE_I18N = True -USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) diff --git a/seminar/migrations/0006_problem_add_timestamp.py b/seminar/migrations/0006_problem_add_timestamp.py index 3df8bfdb..fd1509de 100644 --- a/seminar/migrations/0006_problem_add_timestamp.py +++ b/seminar/migrations/0006_problem_add_timestamp.py @@ -3,7 +3,6 @@ from __future__ import unicode_literals from django.db import models, migrations import datetime -from django.utils.timezone import utc class Migration(migrations.Migration): @@ -16,7 +15,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='problem', name='timestamp', - field=models.DateTimeField(default=datetime.datetime(2015, 5, 15, 8, 54, 56, 319985, tzinfo=utc), verbose_name='vytvo\u0159eno', auto_now=True), + field=models.DateTimeField(default=datetime.datetime(2015, 5, 15, 8, 54, 56, 319985, tzinfo=datetime.timezone.utc), verbose_name='vytvo\u0159eno', auto_now=True), preserve_default=False, ), migrations.AlterField( From b456b8c86168332758ad1424c307043e30f72bc7 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Mon, 13 Nov 2023 20:58:39 +0100 Subject: [PATCH 3/4] =?UTF-8?q?Neodkazovat=20z=20archivu=20na=20v=C3=BDsle?= =?UTF-8?q?dkovku,=20kdy=C5=BE=20tam=20nen=C3=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/templates/seminar/archiv/cisla.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/seminar/templates/seminar/archiv/cisla.html b/seminar/templates/seminar/archiv/cisla.html index ce3b3dba..fe6f7977 100644 --- a/seminar/templates/seminar/archiv/cisla.html +++ b/seminar/templates/seminar/archiv/cisla.html @@ -40,7 +40,9 @@ {% endif %} {% endfor %} - Výsledková listina + {% if rocnik.verejne_vysledkovky_cisla %} {# Tohle jsem asi neměl tady použít, ale šlo to… #} + Výsledková listina + {% endif %} From a9a426ca916b0f0e2d016709ea8ded74baa6c6c0 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Mon, 13 Nov 2023 20:59:06 +0100 Subject: [PATCH 4/4] =?UTF-8?q?Odkaz=20na=20v=C3=BDsledkovku=20a=20ne=20na?= =?UTF-8?q?=20horn=C3=AD=20=C4=8D=C3=A1st=20str=C3=A1nky?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/templates/seminar/archiv/cisla.html | 2 +- seminar/templates/seminar/archiv/rocnik.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/seminar/templates/seminar/archiv/cisla.html b/seminar/templates/seminar/archiv/cisla.html index fe6f7977..830e37b4 100644 --- a/seminar/templates/seminar/archiv/cisla.html +++ b/seminar/templates/seminar/archiv/cisla.html @@ -41,7 +41,7 @@ {% endfor %} {% if rocnik.verejne_vysledkovky_cisla %} {# Tohle jsem asi neměl tady použít, ale šlo to… #} - Výsledková listina + Výsledková listina {% endif %} diff --git a/seminar/templates/seminar/archiv/rocnik.html b/seminar/templates/seminar/archiv/rocnik.html index 410b9361..66336086 100644 --- a/seminar/templates/seminar/archiv/rocnik.html +++ b/seminar/templates/seminar/archiv/rocnik.html @@ -113,7 +113,7 @@ {% if vysledkovka.radky_vysledkovky %} -

Výsledková listina

+

Výsledková listina

{% include "vysledkovky/vysledkovka_rocnik.html" %} {% endif %}