GitLab will be down for maintenance this Sunday 13th June, from approx 7-11am UTC. This is for a PostgreSQL migration. See the tracker issue for more informations.

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 ...@@ -2,6 +2,6 @@ python-dateutil>2.0,<3.0
djangorestframework>=3.10,<3.11 djangorestframework>=3.10,<3.11
drf-nested-routers drf-nested-routers
jsonfield jsonfield
django-filter>=1.1.0,<1.2.0 django-filter==2.2
celery>=4.3,<5.0 celery>=4.3,<5.0
redis redis
django>=1.11,<1.12 django>=2.1,<2.2
mysqlclient>=1.3.0,<1.4 mysqlclient>=1.3.0,<1.4
-r requirements-base.txt -r requirements-base.txt
django>=1.11,<1.12 django>=2.1,<2.2
psycopg2>=2.8,<2.9 psycopg2>=2.8,<2.9
-r requirements-base.txt -r requirements-base.txt
...@@ -15,11 +15,12 @@ ROOT_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), ...@@ -15,11 +15,12 @@ ROOT_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)),
# Models # Models
INSTALLED_APPS = [ INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.sites', 'django.contrib.sites',
'django.contrib.admin',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'patchwork', 'patchwork',
'rest_framework', 'rest_framework',
...@@ -30,11 +31,11 @@ INSTALLED_APPS = [ ...@@ -30,11 +31,11 @@ INSTALLED_APPS = [
MIDDLEWARE = [ MIDDLEWARE = [
'patchwork.middleware.AccessControlAllowOriginMiddleware', 'patchwork.middleware.AccessControlAllowOriginMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'patchwork.threadlocalrequest.ThreadLocalRequestMiddleware', 'patchwork.threadlocalrequest.ThreadLocalRequestMiddleware',
'django.contrib.admindocs.middleware.XViewMiddleware', 'django.contrib.admindocs.middleware.XViewMiddleware',
] ]
......
...@@ -21,4 +21,3 @@ PASSWORD_HASHERS = ( ...@@ -21,4 +21,3 @@ PASSWORD_HASHERS = (
'django.contrib.auth.hashers.MD5PasswordHasher', 'django.contrib.auth.hashers.MD5PasswordHasher',
) )
logging.disable(logging.CRITICAL) logging.disable(logging.CRITICAL)
INSTALLED_APPS.remove('django.contrib.admin')
...@@ -142,27 +142,32 @@ urlpatterns = [ ...@@ -142,27 +142,32 @@ urlpatterns = [
name='user_unlink'), name='user_unlink'),
# password change # password change
url(r'^user/password-change/$', auth_views.password_change, path('user/password-change/',
auth_views.PasswordChangeView.as_view(),
name='password_change'), 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'), 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'), 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'), name='password_reset_done'),
url(r'^user/password-reset/(?P<uidb64>[0-9A-Za-z_\-]+)/' 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})/$', 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'), name='password_reset_confirm'),
url(r'^user/password-reset/complete/$', path('user/password-reset/complete/',
auth_views.password_reset_complete, auth_views.PasswordResetCompleteView.as_view(),
name='password_reset_complete'), name='password_reset_complete'),
# login/logout # login/logout
url(r'^user/login/$', auth_views.login, path('user/login/', auth_views.LoginView.as_view(
{'template_name': 'patchwork/login.html'}, template_name='patchwork/login.html'
),
name='auth_login'), name='auth_login'),
url(r'^user/logout/$', auth_views.logout, path('user/logout/', auth_views.LoginView.as_view(),
{'next_page': '/'}, {'next_page': '/'},
name='auth_logout'), name='auth_logout'),
......
...@@ -6,7 +6,7 @@ skipsdist = True ...@@ -6,7 +6,7 @@ skipsdist = True
[testenv] [testenv]
deps = deps =
-r{toxinidir}/docs/requirements-dev.txt -r{toxinidir}/docs/requirements-dev.txt
django20: django>=2.0,<2.1 django21: django>=2.1,<2.2
tblib tblib
setenv = setenv =
DJANGO_SETTINGS_MODULE = patchwork.settings.test 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