Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hub
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
thomasDOTwtf
hub
Commits
002a992a
Commit
002a992a
authored
Dec 20, 2021
by
grollicus
Browse files
Options
Downloads
Patches
Plain Diff
update to django4
parent
84db5a57
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/backoffice/views/auth.py
+2
-2
2 additions, 2 deletions
src/backoffice/views/auth.py
src/plainui/jinja2.py
+2
-2
2 additions, 2 deletions
src/plainui/jinja2.py
src/plainui/views.py
+2
-2
2 additions, 2 deletions
src/plainui/views.py
src/requirements.txt
+3
-3
3 additions, 3 deletions
src/requirements.txt
with
9 additions
and
9 deletions
src/backoffice/views/auth.py
+
2
−
2
View file @
002a992a
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
src/plainui/jinja2.py
+
2
−
2
View file @
002a992a
...
@@ -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
u
gettext
,
u
ngettext
,
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
(
u
gettext
,
u
ngettext
,
newstyle
=
True
)
env
.
install_gettext_callables
(
gettext
,
ngettext
,
newstyle
=
True
)
return
env
return
env
This diff is collapsed.
Click to expand it.
src/plainui/views.py
+
2
−
2
View file @
002a992a
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/requirements.txt
+
3
−
3
View file @
002a992a
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment