From 906db7069ba4c994b4b3e568287d880e556d6fa3 Mon Sep 17 00:00:00 2001 From: Qwann Date: Mon, 27 Aug 2018 00:30:12 +0200 Subject: [PATCH] MAJ : MAJ 2.0, remove debug_panel, django.change url.resolvers to django.urls --- poulpe/settings/common.py | 4 ++-- poulpe/settings/dev.py | 6 ++++-- requirements-devel.txt | 1 - requirements.txt | 2 +- users/urls.py | 2 +- users/views.py | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/poulpe/settings/common.py b/poulpe/settings/common.py index 54a8bb1..0d50381 100644 --- a/poulpe/settings/common.py +++ b/poulpe/settings/common.py @@ -10,7 +10,7 @@ We also load the secrets in this file. import os from . import secret -from django.core.urlresolvers import reverse_lazy +from django.urls import reverse_lazy from django.contrib import messages @@ -85,7 +85,7 @@ MIDDLEWARE = [ 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', + # 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] diff --git a/poulpe/settings/dev.py b/poulpe/settings/dev.py index c807064..50896b0 100644 --- a/poulpe/settings/dev.py +++ b/poulpe/settings/dev.py @@ -11,9 +11,11 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' DEBUG = True # Add some debugging tools -INSTALLED_APPS += ["debug_toolbar", "debug_panel"] # NOQA +INSTALLED_APPS += ["debug_toolbar", ] # NOQA MIDDLEWARE = ( - ["debug_panel.middleware.DebugPanelMiddleware"] + [ + "debug_toolbar.middleware.DebugToolbarMiddleware", + ] + MIDDLEWARE # NOQA ) diff --git a/requirements-devel.txt b/requirements-devel.txt index 83053f7..425dfc3 100644 --- a/requirements-devel.txt +++ b/requirements-devel.txt @@ -1,4 +1,3 @@ -r requirements.txt django-debug-toolbar -django-debug-panel ipython diff --git a/requirements.txt b/requirements.txt index 441bf48..3d3bc3a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ asgi-redis==1.3.0 asgiref==1.1.1 django-bootstrap3==10.0.1 channels==1.1.5 -Django==1.11.11 +Django==2.0 django-allauth==0.36.0 django-allauth-cas==1.0.0b2 django-tables2==2.0.0a2 diff --git a/users/urls.py b/users/urls.py index 6933001..e2695e4 100644 --- a/users/urls.py +++ b/users/urls.py @@ -1,6 +1,6 @@ from django.conf.urls import url from django.contrib.auth import views as auth_views -from django.core.urlresolvers import reverse_lazy +from django.urls import reverse_lazy from django.utils.translation import ugettext_lazy as _ from shared.views import Home from users.views import CreateUser diff --git a/users/views.py b/users/views.py index 0746591..d33d61d 100644 --- a/users/views.py +++ b/users/views.py @@ -1,7 +1,7 @@ from .forms import CreateUserForm from django.views.generic.edit import CreateView from django.contrib.messages.views import SuccessMessageMixin -from django.core.urlresolvers import reverse_lazy +from django.urls import reverse_lazy class CreateUser(SuccessMessageMixin, CreateView):