Commit 732e033b authored by Arkadiusz Hiler's avatar Arkadiusz Hiler
Browse files

Update to Django 2.1 \o/


Signed-off-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent 6f7389f9
......@@ -2,6 +2,6 @@ python-dateutil>2.0,<3.0
djangorestframework>=3.10,<3.11
drf-nested-routers
jsonfield
django-filter>=1.1.0,<1.2.0
django-filter==2.2
celery>=4.3,<5.0
redis
django>=1.11,<1.12
django>=2.1,<2.2
mysqlclient>=1.3.0,<1.4
-r requirements-base.txt
django>=1.11,<1.12
django>=2.1,<2.2
psycopg2>=2.8,<2.9
-r requirements-base.txt
......@@ -15,11 +15,12 @@ ROOT_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)),
# Models
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.staticfiles',
'patchwork',
'rest_framework',
......@@ -30,11 +31,11 @@ INSTALLED_APPS = [
MIDDLEWARE = [
'patchwork.middleware.AccessControlAllowOriginMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'patchwork.threadlocalrequest.ThreadLocalRequestMiddleware',
'django.contrib.admindocs.middleware.XViewMiddleware',
]
......
......@@ -21,4 +21,3 @@ PASSWORD_HASHERS = (
'django.contrib.auth.hashers.MD5PasswordHasher',
)
logging.disable(logging.CRITICAL)
INSTALLED_APPS.remove('django.contrib.admin')
......@@ -142,27 +142,32 @@ urlpatterns = [
name='user_unlink'),
# password change
url(r'^user/password-change/$', auth_views.password_change,
path('user/password-change/',
auth_views.PasswordChangeView.as_view(),
name='password_change'),
url(r'^user/password-change/done/$', auth_views.password_change_done,
path('user/password-change/done/',
auth_views.PasswordChangeDoneView.as_view(),
name='password_change_done'),
url(r'^user/password-reset/$', auth_views.password_reset,
path('user/password-reset/',
auth_views.PasswordResetView.as_view(),
name='password_reset'),
url(r'^user/password-reset/mail-sent/$', auth_views.password_reset_done,
path('user/password-reset/mail-sent/',
auth_views.PasswordResetDoneView.as_view(),
name='password_reset_done'),
url(r'^user/password-reset/(?P<uidb64>[0-9A-Za-z_\-]+)/'
r'(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
auth_views.password_reset_confirm,
auth_views.PasswordResetConfirmView.as_view(),
name='password_reset_confirm'),
url(r'^user/password-reset/complete/$',
auth_views.password_reset_complete,
path('user/password-reset/complete/',
auth_views.PasswordResetCompleteView.as_view(),
name='password_reset_complete'),
# login/logout
url(r'^user/login/$', auth_views.login,
{'template_name': 'patchwork/login.html'},
path('user/login/', auth_views.LoginView.as_view(
template_name='patchwork/login.html'
),
name='auth_login'),
url(r'^user/logout/$', auth_views.logout,
path('user/logout/', auth_views.LoginView.as_view(),
{'next_page': '/'},
name='auth_logout'),
......
......@@ -6,7 +6,7 @@ skipsdist = True
[testenv]
deps =
-r{toxinidir}/docs/requirements-dev.txt
django20: django>=2.0,<2.1
django21: django>=2.1,<2.2
tblib
setenv =
DJANGO_SETTINGS_MODULE = patchwork.settings.test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment