Skip to content
Snippets Groups Projects
Commit 26423909 authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Upgrade django and other python dependencies

Upgrade django to 4.1
Upgrade django-timezone-field, django-simple-history, django-debug-toolbar and django-bootstrap-datepicker-plus
Upgrade mysqlclient
Remove obsolete pytz
Adapt timezone handling code to new interface of TimezoneInfo (part of python since 3.9 and backport included in 3.8)
Drop support for python 3.7 (since Django 4 requires >= 3.8)
parent 2455da83
No related branches found
No related tags found
1 merge request!158Upgrades (bootstrap, fontawesome, django, js dependencies) and static file compression
Pipeline #129503 passed
...@@ -80,7 +80,7 @@ class AvailabilitiesFormMixin(forms.Form): ...@@ -80,7 +80,7 @@ class AvailabilitiesFormMixin(forms.Form):
if not obj: if not obj:
raise TypeError raise TypeError
if obj.tzinfo is None: if obj.tzinfo is None:
obj = tz.localize(obj) obj = obj.astimezone(tz)
return obj return obj
......
import csv import csv
import io import io
from bootstrap_datepicker_plus import DateTimePickerInput from bootstrap_datepicker_plus.widgets import DateTimePickerInput
from django import forms from django import forms
from django.forms.utils import ErrorList from django.forms.utils import ErrorList
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
......
# Generated by Django 4.1.5 on 2023-01-03 17:04
from django.db import migrations
import timezone_field.fields
class Migration(migrations.Migration):
dependencies = [
('AKModel', '0056_remove_tags'),
]
operations = [
migrations.AlterField(
model_name='event',
name='timezone',
field=timezone_field.fields.TimeZoneField(choices_display='WITH_GMT_OFFSET', default='Europe/Berlin', help_text='Time Zone where this event takes place in', verbose_name='Time Zone'),
),
]
...@@ -22,7 +22,7 @@ class Event(models.Model): ...@@ -22,7 +22,7 @@ class Event(models.Model):
place = models.CharField(max_length=128, blank=True, verbose_name=_('Place'), place = models.CharField(max_length=128, blank=True, verbose_name=_('Place'),
help_text=_('City etc. the event takes place in')) help_text=_('City etc. the event takes place in'))
timezone = TimeZoneField(default='Europe/Berlin', display_GMT_offset=True, blank=False, timezone = TimeZoneField(default='Europe/Berlin', blank=False, choices_display="WITH_GMT_OFFSET",
verbose_name=_('Time Zone'), help_text=_('Time Zone where this event takes place in')) verbose_name=_('Time Zone'), help_text=_('Time Zone where this event takes place in'))
start = models.DateTimeField(verbose_name=_('Start'), help_text=_('Time the event begins')) start = models.DateTimeField(verbose_name=_('Start'), help_text=_('Time the event begins'))
end = models.DateTimeField(verbose_name=_('End'), help_text=_('Time the event ends')) end = models.DateTimeField(verbose_name=_('End'), help_text=_('Time the event ends'))
......
...@@ -541,8 +541,8 @@ class DefaultSlotEditorView(EventSlugMixin, IntermediateAdminView): ...@@ -541,8 +541,8 @@ class DefaultSlotEditorView(EventSlugMixin, IntermediateAdminView):
previous_slot_ids = set(s.id for s in self.event.defaultslot_set.all()) previous_slot_ids = set(s.id for s in self.event.defaultslot_set.all())
for slot in default_slots_raw: for slot in default_slots_raw:
start = tz.localize(parse_datetime(slot["start"])) start = parse_datetime(slot["start"]).astimezone(tz)
end = tz.localize(parse_datetime(slot["end"])) end = parse_datetime(slot["end"]).astimezone(tz)
if slot["id"] != '': if slot["id"] != '':
id = int(slot["id"]) id = int(slot["id"])
......
...@@ -10,7 +10,7 @@ setup. ...@@ -10,7 +10,7 @@ setup.
### System Requirements ### System Requirements
* Python 3.7 incl. development tools * Python 3.8+ incl. development tools
* Virtualenv * Virtualenv
* pdflatex & beamer * pdflatex & beamer
class (`texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-extra texlive-luatex`) class (`texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-extra texlive-luatex`)
......
Django==3.2.16 Django==4.1.5
django-bootstrap5==22.2 django-bootstrap5==22.2
fontawesomefree==6.2.1 # Makes static files (css, fonts) available locally fontawesomefree==6.2.1 # Makes static files (css, fonts) available locally
django-fontawesome-6==1.0.0.0 # Provides an icon field for models and forms as well as handy shortcuts to render icons django-fontawesome-6==1.0.0.0 # Provides an icon field for models and forms as well as handy shortcuts to render icons
django-split-settings==1.2.0 django-split-settings==1.2.0
django-timezone-field==4.1.2 django-timezone-field==5.0
djangorestframework==3.14.0 djangorestframework==3.14.0
django-simple-history==3.1.1 django-simple-history==3.2.0
django-registration-redux==2.11 django-registration-redux==2.11
django-debug-toolbar==3.7.0 django-debug-toolbar==3.8.1
django-bootstrap-datepicker-plus==3.0.5 django-bootstrap-datepicker-plus==5.0.2
django-tex==1.1.10 django-tex==1.1.10
django-csp==3.7 django-csp==3.7
mysqlclient==2.0.3 # for production deployment mysqlclient==2.1.1 # for production deployment
pytz==2022.4 tzdata==2022.7
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment