Skip to content
Snippets Groups Projects
Commit 002a992a authored by grollicus's avatar grollicus
Browse files

update to django4

parent 84db5a57
Branches
Tags
No related merge requests found
...@@ -11,7 +11,7 @@ from django.shortcuts import redirect ...@@ -11,7 +11,7 @@ from django.shortcuts import redirect
from django.template.loader import render_to_string from django.template.loader import render_to_string
from django.views.generic import FormView, TemplateView, View from django.views.generic import FormView, TemplateView, View
from django.urls import reverse, reverse_lazy from django.urls import reverse, reverse_lazy
from django.utils.encoding import force_bytes, force_text from django.utils.encoding import force_bytes, force_str
from django.utils.http import urlsafe_base64_decode, urlsafe_base64_encode from django.utils.http import urlsafe_base64_decode, urlsafe_base64_encode
from core.models import PlatformUser, UserCommunicationChannel from core.models import PlatformUser, UserCommunicationChannel
...@@ -84,7 +84,7 @@ class SignupDoneView(ConferenceMixin, TemplateView): ...@@ -84,7 +84,7 @@ class SignupDoneView(ConferenceMixin, TemplateView):
def signup_activate(request, uidb64, channel_id, token): def signup_activate(request, uidb64, channel_id, token):
try: try:
uid = force_text(urlsafe_base64_decode(uidb64)) uid = force_str(urlsafe_base64_decode(uidb64))
user, channel = None, None # ensure variables exists if any of the next two fail, otherwise the logger call fails user, channel = None, None # ensure variables exists if any of the next two fail, otherwise the logger call fails
user = PlatformUser.objects.get(pk=uid) user = PlatformUser.objects.get(pk=uid)
channel = user.communication_channels.get(id=channel_id) channel = user.communication_channels.get(id=channel_id)
......
...@@ -6,7 +6,7 @@ from django.utils.formats import localize ...@@ -6,7 +6,7 @@ from django.utils.formats import localize
from django.utils.functional import LazyObject from django.utils.functional import LazyObject
from django.utils.html import json_script from django.utils.html import json_script
from django.utils.timezone import localdate, localtime from django.utils.timezone import localdate, localtime
from django.utils.translation import ugettext, ungettext, get_language from django.utils.translation import gettext, ngettext, get_language
from django.contrib.humanize.templatetags.humanize import NaturalTimeFormatter from django.contrib.humanize.templatetags.humanize import NaturalTimeFormatter
from jinja2 import contextfunction, Environment from jinja2 import contextfunction, Environment
...@@ -140,5 +140,5 @@ def environment(**options): ...@@ -140,5 +140,5 @@ def environment(**options):
env.filters['strftime'] = custom_strftime env.filters['strftime'] = custom_strftime
env.filters['strfdate'] = custom_strfdate env.filters['strfdate'] = custom_strfdate
env.filters['strfdates'] = custom_strfdates env.filters['strfdates'] = custom_strfdates
env.install_gettext_callables(ugettext, ungettext, newstyle=True) env.install_gettext_callables(gettext, ngettext, newstyle=True)
return env return env
...@@ -1263,7 +1263,7 @@ class FahrplanView(ConferenceRequiredMixin, TemplateView): ...@@ -1263,7 +1263,7 @@ class FahrplanView(ConferenceRequiredMixin, TemplateView):
if timezone_warning: if timezone_warning:
current_timezone = timezone.get_current_timezone() current_timezone = timezone.get_current_timezone()
if current_timezone is not None: if current_timezone is not None:
context['current_timezone'] = current_timezone.zone context['current_timezone'] = current_timezone.tzname(datetime.now()())
context['conference_timezone'] = self.conf.timezone context['conference_timezone'] = self.conf.timezone
except pytz.UnknownTimeZoneError: except pytz.UnknownTimeZoneError:
context['timezone_warning'] = False context['timezone_warning'] = False
...@@ -1397,7 +1397,7 @@ class PublicFahrplanView(ConferenceRequiredMixin, TemplateView): ...@@ -1397,7 +1397,7 @@ class PublicFahrplanView(ConferenceRequiredMixin, TemplateView):
if timezone_warning: if timezone_warning:
current_timezone = timezone.get_current_timezone() current_timezone = timezone.get_current_timezone()
if current_timezone is not None: if current_timezone is not None:
context['current_timezone'] = current_timezone.zone context['current_timezone'] = current_timezone.tzname(datetime.now())
context['conference_timezone'] = self.conf.timezone context['conference_timezone'] = self.conf.timezone
except pytz.UnknownTimeZoneError: except pytz.UnknownTimeZoneError:
context['timezone_warning'] = False context['timezone_warning'] = False
......
bleach >= 4.1, <5 bleach >= 4.1, <5
Django >=3.2.8, <3.3 Django >=4.0
django_bootstrap4 >= 3.0.1, <4 django_bootstrap4 >= 3.0.1, <4
django-cors-middleware >= 1.5.0, <1.6 django-cors-headers >= 3.10
django-debug-toolbar >= 3.2.2, <4 django-debug-toolbar >= 3.2.2, <4
django-oauth-toolkit >= 1.5.0, <1.6 django-oauth-toolkit >= 1.6
django-widget-tweaks >= 1.4.8, <1.5 django-widget-tweaks >= 1.4.8, <1.5
djangorestframework >= 3.12.4, <4 djangorestframework >= 3.12.4, <4
dj-database-url >= 0.5.0, <0.6 dj-database-url >= 0.5.0, <0.6
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment