From 4526d7c537ff01cdc133f3cb4b4f6befe932b058 Mon Sep 17 00:00:00 2001 From: Adrian Boyko Date: Sun, 19 Aug 2018 18:59:08 -0700 Subject: [PATCH 1/2] 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. --- helpdesk/urls.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/helpdesk/urls.py b/helpdesk/urls.py index 6772da22..c6c7379f 100644 --- a/helpdesk/urls.py +++ b/helpdesk/urls.py @@ -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'), ] From 0f99599982f6b84baf98714f42b346d1927161d5 Mon Sep 17 00:00:00 2001 From: Garret Wassermann Date: Sat, 1 Sep 2018 23:14:57 -0400 Subject: [PATCH 2/2] Bump to v0.2.10 --- demo/setup.py | 5 +++-- setup.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/demo/setup.py b/demo/setup.py index 3a5a460d..3b10aa9f 100644 --- a/demo/setup.py +++ b/demo/setup.py @@ -13,7 +13,7 @@ project_root = os.path.dirname(here) NAME = 'django-helpdesk-demodesk' DESCRIPTION = 'A demo Django project using django-helpdesk' README = open(os.path.join(here, 'README.rst')).read() -VERSION = '0.2.9' +VERSION = '0.2.10' #VERSION = open(os.path.join(project_root, 'VERSION')).read().strip() AUTHOR = 'django-helpdesk team' URL = 'https://github.com/django-helpdesk/django-helpdesk' @@ -24,7 +24,8 @@ CLASSIFIERS = ['Development Status :: 4 - Beta', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Framework :: Django :: 1.11', - 'Framework :: Django :: 2.0'] + 'Framework :: Django :: 2.0', + 'Framework :: Django :: 2.1'] KEYWORDS = [] PACKAGES = ['demodesk'] REQUIREMENTS = [ diff --git a/setup.py b/setup.py index 11872617..1a93d1ae 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ from distutils.util import convert_path from fnmatch import fnmatchcase from setuptools import setup, find_packages -version = '0.2.9' +version = '0.2.10' # Provided as an attribute, so you can append to these instead # of replicating them: @@ -137,6 +137,7 @@ setup( "Framework :: Django", "Framework :: Django :: 1.11", "Framework :: Django :: 2.0", + "Framework :: Django :: 2.1", "Environment :: Web Environment", "Operating System :: OS Independent", "Intended Audience :: Customer Service",