Bump Django to 4.1.* (#2989)

This commit is contained in:
Raphael Michel
2023-06-05 09:56:31 +02:00
committed by GitHub
parent 3a8556bb78
commit bd32b33ba9
119 changed files with 742 additions and 613 deletions

View File

@@ -61,7 +61,6 @@ from django.utils.timezone import now
from django.utils.translation import gettext_lazy as _, pgettext
from i18nfield.strings import LazyI18nString
from pypdf import PdfReader
from pytz import timezone
from reportlab.graphics import renderPDF
from reportlab.graphics.barcode.qr import QrCodeWidget
from reportlab.graphics.shapes import Drawing
@@ -237,7 +236,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Event begin date and time"),
"editor_sample": _("2017-05-31 20:00"),
"evaluate": lambda op, order, ev: date_format(
ev.date_from.astimezone(timezone(ev.settings.timezone)),
ev.date_from.astimezone(ev.timezone),
"SHORT_DATETIME_FORMAT"
) if ev.date_from else ""
}),
@@ -245,7 +244,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Event begin date"),
"editor_sample": _("2017-05-31"),
"evaluate": lambda op, order, ev: date_format(
ev.date_from.astimezone(timezone(ev.settings.timezone)),
ev.date_from.astimezone(ev.timezone),
"SHORT_DATE_FORMAT"
) if ev.date_from else ""
}),
@@ -263,7 +262,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Event end date and time"),
"editor_sample": _("2017-05-31 22:00"),
"evaluate": lambda op, order, ev: date_format(
ev.date_to.astimezone(timezone(ev.settings.timezone)),
ev.date_to.astimezone(ev.timezone),
"SHORT_DATETIME_FORMAT"
) if ev.date_to else ""
}),
@@ -271,7 +270,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Event end date"),
"editor_sample": _("2017-05-31"),
"evaluate": lambda op, order, ev: date_format(
ev.date_to.astimezone(timezone(ev.settings.timezone)),
ev.date_to.astimezone(ev.timezone),
"SHORT_DATE_FORMAT"
) if ev.date_to else ""
}),
@@ -279,7 +278,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Event end time"),
"editor_sample": _("22:00"),
"evaluate": lambda op, order, ev: date_format(
ev.date_to.astimezone(timezone(ev.settings.timezone)),
ev.date_to.astimezone(ev.timezone),
"TIME_FORMAT"
) if ev.date_to else ""
}),
@@ -292,7 +291,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Event admission date and time"),
"editor_sample": _("2017-05-31 19:00"),
"evaluate": lambda op, order, ev: date_format(
ev.date_admission.astimezone(timezone(ev.settings.timezone)),
ev.date_admission.astimezone(ev.timezone),
"SHORT_DATETIME_FORMAT"
) if ev.date_admission else ""
}),
@@ -300,7 +299,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Event admission time"),
"editor_sample": _("19:00"),
"evaluate": lambda op, order, ev: date_format(
ev.date_admission.astimezone(timezone(ev.settings.timezone)),
ev.date_admission.astimezone(ev.timezone),
"TIME_FORMAT"
) if ev.date_admission else ""
}),
@@ -385,7 +384,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Printing date"),
"editor_sample": _("2017-05-31"),
"evaluate": lambda op, order, ev: date_format(
now().astimezone(timezone(ev.settings.timezone)),
now().astimezone(ev.timezone),
"SHORT_DATE_FORMAT"
)
}),
@@ -393,7 +392,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Printing date and time"),
"editor_sample": _("2017-05-31 19:00"),
"evaluate": lambda op, order, ev: date_format(
now().astimezone(timezone(ev.settings.timezone)),
now().astimezone(ev.timezone),
"SHORT_DATETIME_FORMAT"
)
}),
@@ -401,7 +400,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Printing time"),
"editor_sample": _("19:00"),
"evaluate": lambda op, order, ev: date_format(
now().astimezone(timezone(ev.settings.timezone)),
now().astimezone(ev.timezone),
"TIME_FORMAT"
)
}),
@@ -409,7 +408,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Validity start date"),
"editor_sample": _("2017-05-31"),
"evaluate": lambda op, order, ev: date_format(
op.valid_from.astimezone(timezone(ev.settings.timezone)),
op.valid_from.astimezone(ev.timezone),
"SHORT_DATE_FORMAT"
) if op.valid_from else ""
}),
@@ -417,7 +416,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Validity start date and time"),
"editor_sample": _("2017-05-31 19:00"),
"evaluate": lambda op, order, ev: date_format(
op.valid_from.astimezone(timezone(ev.settings.timezone)),
op.valid_from.astimezone(ev.timezone),
"SHORT_DATETIME_FORMAT"
) if op.valid_from else ""
}),
@@ -425,7 +424,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Validity start time"),
"editor_sample": _("19:00"),
"evaluate": lambda op, order, ev: date_format(
op.valid_from.astimezone(timezone(ev.settings.timezone)),
op.valid_from.astimezone(ev.timezone),
"TIME_FORMAT"
) if op.valid_from else ""
}),
@@ -433,7 +432,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Validity end date"),
"editor_sample": _("2017-05-31"),
"evaluate": lambda op, order, ev: date_format(
op.valid_until.astimezone(timezone(ev.settings.timezone)),
op.valid_until.astimezone(ev.timezone),
"SHORT_DATE_FORMAT"
) if op.valid_until else ""
}),
@@ -441,7 +440,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Validity end date and time"),
"editor_sample": _("2017-05-31 19:00"),
"evaluate": lambda op, order, ev: date_format(
op.valid_until.astimezone(timezone(ev.settings.timezone)),
op.valid_until.astimezone(ev.timezone),
"SHORT_DATETIME_FORMAT"
) if op.valid_until else ""
}),
@@ -449,7 +448,7 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Validity end time"),
"editor_sample": _("19:00"),
"evaluate": lambda op, order, ev: date_format(
op.valid_until.astimezone(timezone(ev.settings.timezone)),
op.valid_until.astimezone(ev.timezone),
"TIME_FORMAT"
) if op.valid_until else ""
}),