diff --git a/procat2/settings.py b/procat2/settings.py index 4a201cf..1eb627b 100644 --- a/procat2/settings.py +++ b/procat2/settings.py @@ -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 * diff --git a/procat2/urls.py b/procat2/urls.py index 9d119b0..e035f87 100644 --- a/procat2/urls.py +++ b/procat2/urls.py @@ -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'] diff --git a/requirements.txt b/requirements.txt index ca2e5ab..baa7e24 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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