MAJ : MAJ 2.0, remove debug_panel, django.change url.resolvers to django.urls
This commit is contained in:
parent
b45d7722a7
commit
906db7069b
6 changed files with 9 additions and 8 deletions
|
@ -10,7 +10,7 @@ We also load the secrets in this file.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from . import secret
|
from . import secret
|
||||||
from django.core.urlresolvers import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ MIDDLEWARE = [
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
# 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
||||||
'django.contrib.messages.middleware.MessageMiddleware',
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
]
|
]
|
||||||
|
|
|
@ -11,9 +11,11 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
# Add some debugging tools
|
# Add some debugging tools
|
||||||
INSTALLED_APPS += ["debug_toolbar", "debug_panel"] # NOQA
|
INSTALLED_APPS += ["debug_toolbar", ] # NOQA
|
||||||
MIDDLEWARE = (
|
MIDDLEWARE = (
|
||||||
["debug_panel.middleware.DebugPanelMiddleware"]
|
[
|
||||||
|
"debug_toolbar.middleware.DebugToolbarMiddleware",
|
||||||
|
]
|
||||||
+ MIDDLEWARE # NOQA
|
+ MIDDLEWARE # NOQA
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
django-debug-toolbar
|
django-debug-toolbar
|
||||||
django-debug-panel
|
|
||||||
ipython
|
ipython
|
||||||
|
|
|
@ -2,7 +2,7 @@ asgi-redis==1.3.0
|
||||||
asgiref==1.1.1
|
asgiref==1.1.1
|
||||||
django-bootstrap3==10.0.1
|
django-bootstrap3==10.0.1
|
||||||
channels==1.1.5
|
channels==1.1.5
|
||||||
Django==1.11.11
|
Django==2.0
|
||||||
django-allauth==0.36.0
|
django-allauth==0.36.0
|
||||||
django-allauth-cas==1.0.0b2
|
django-allauth-cas==1.0.0b2
|
||||||
django-tables2==2.0.0a2
|
django-tables2==2.0.0a2
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
from django.contrib.auth import views as auth_views
|
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 django.utils.translation import ugettext_lazy as _
|
||||||
from shared.views import Home
|
from shared.views import Home
|
||||||
from users.views import CreateUser
|
from users.views import CreateUser
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .forms import CreateUserForm
|
from .forms import CreateUserForm
|
||||||
from django.views.generic.edit import CreateView
|
from django.views.generic.edit import CreateView
|
||||||
from django.contrib.messages.views import SuccessMessageMixin
|
from django.contrib.messages.views import SuccessMessageMixin
|
||||||
from django.core.urlresolvers import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
|
|
||||||
|
|
||||||
class CreateUser(SuccessMessageMixin, CreateView):
|
class CreateUser(SuccessMessageMixin, CreateView):
|
||||||
|
|
Loading…
Reference in a new issue