add django-extensions and django-debug-toolbar

This commit is contained in:
Seth Ladygo
2019-03-13 21:02:59 -07:00
parent a70803ae39
commit e4cfb2865f
3 changed files with 25 additions and 1 deletions

View File

@ -70,6 +70,7 @@ INSTALLED_APPS = [
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'django_extensions',
'account',
'lazysignup',
'dashboard',
@ -112,6 +113,7 @@ WSGI_APPLICATION = 'procat2.wsgi.application'
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
#"account.auth_backends.EmailAuthenticationBackend",
'lazysignup.backends.LazySignupBackend',
)
@ -141,7 +143,6 @@ USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.1/howto/static-files/
STATIC_URL = '/static/'
@ -154,5 +155,16 @@ SITE_ID = 1
ACCOUNT_EMAIL_UNIQUE = True
ACCOUNT_EMAIL_CONFIRMATION_REQUIRED = True
# django-debug-toolbar
DJDT = False
if DJDT:
MIDDLEWARE += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
INSTALLED_APPS += (
'debug_toolbar',
)
INTERNAL_IPS = ('127.0.0.1',)
# bring in ansible-defined settings
from .settings_ansible import *

View File

@ -15,6 +15,7 @@ Including another URLconf
"""
from django.contrib import admin
from django.urls import include, path
from django.conf import settings
from dashboard.views import dashboard
from lazysignup.views import convert
@ -33,6 +34,12 @@ urlpatterns = [
path('convert/done/', lazy_convert_done, name='lazysignup_convert_done'),
]
if settings.DJDT:
import debug_toolbar
urlpatterns += [
path('debug/', include(debug_toolbar.urls)),
]
# accounts/login/ [name='login']
# accounts/logout/ [name='logout']
# accounts/password_change/ [name='password_change']

View File

@ -1,6 +1,11 @@
Django==2.1.7
django-appconf==1.0.3
django-debug-toolbar==1.11
django-extensions==2.1.6
django-lazysignup==2.0.0
django-user-accounts==2.1.0
psycopg2-binary==2.7.7
pytz==2018.9
six==1.12.0
sqlparse==0.3.0
Werkzeug==0.14.1