mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-26 08:39:08 +01:00
Fixed login/logout for Django 2.1.
In django.contrib.auth.views, the login and logout funcs are removed as of Django 2.1. Helpdesk's urls.py needs to be updated to use the LoginView and LogoutView classes instead, which were introduced in Django 1.11.
This commit is contained in:
parent
73f113540f
commit
4526d7c537
@ -185,13 +185,14 @@ urlpatterns += [
|
||||
|
||||
urlpatterns += [
|
||||
url(r'^login/$',
|
||||
auth_views.login,
|
||||
{'template_name': 'helpdesk/registration/login.html'},
|
||||
auth_views.LoginView.as_view(
|
||||
template_name='helpdesk/registration/login.html'),
|
||||
name='login'),
|
||||
|
||||
url(r'^logout/$',
|
||||
auth_views.logout,
|
||||
{'template_name': 'helpdesk/registration/login.html', 'next_page': '../'},
|
||||
auth_views.LogoutView.as_view(
|
||||
template_name='helpdesk/registration/login.html',
|
||||
next_page='../'),
|
||||
name='logout'),
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user