Install and enable Django Debug Toolbar when in debug mode
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>merge-requests/429/head
parent
494351e2e7
commit
8710a2df3b
|
@ -46,6 +46,13 @@ LOCAL_APPS = (
|
||||||
'db.api',
|
'db.api',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if DEBUG:
|
||||||
|
DJANGO_APPS += ('debug_toolbar', )
|
||||||
|
DEBUG_TOOLBAR_CONFIG = {
|
||||||
|
'SHOW_TOOLBAR_CALLBACK':
|
||||||
|
lambda request: request.environ.get('SERVER_NAME', None) != 'testserver',
|
||||||
|
}
|
||||||
|
|
||||||
if AUTH0:
|
if AUTH0:
|
||||||
THIRD_PARTY_APPS += ('social_django', )
|
THIRD_PARTY_APPS += ('social_django', )
|
||||||
LOCAL_APPS += ('auth0login', )
|
LOCAL_APPS += ('auth0login', )
|
||||||
|
@ -63,6 +70,9 @@ MIDDLEWARE = (
|
||||||
'csp.middleware.CSPMiddleware',
|
'csp.middleware.CSPMiddleware',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if DEBUG:
|
||||||
|
MIDDLEWARE = ('debug_toolbar.middleware.DebugToolbarMiddleware', ) + MIDDLEWARE
|
||||||
|
|
||||||
# Email
|
# Email
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||||
|
|
|
@ -30,6 +30,10 @@ if settings.AUTH0:
|
||||||
urlpatterns += [url(r'^', include('auth0login.urls'))]
|
urlpatterns += [url(r'^', include('auth0login.urls'))]
|
||||||
|
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
|
import debug_toolbar
|
||||||
|
|
||||||
|
urlpatterns = [url(r'^__debug__/', include(debug_toolbar.urls))] + urlpatterns
|
||||||
|
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
url(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}),
|
url(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}),
|
||||||
]
|
]
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
apipkg==1.5
|
apipkg==1.5
|
||||||
atomicwrites==1.3.0
|
atomicwrites==1.3.0
|
||||||
attrs==19.1.0
|
attrs==19.2.0
|
||||||
Click==7.0
|
Click==7.0
|
||||||
coverage==4.5.4
|
coverage==4.5.4
|
||||||
docopt==0.6.1
|
docopt==0.6.1
|
||||||
|
@ -21,7 +21,7 @@ pluggy==0.13.0
|
||||||
pur==5.2.2
|
pur==5.2.2
|
||||||
py==1.8.0
|
py==1.8.0
|
||||||
pyparsing==2.4.2
|
pyparsing==2.4.2
|
||||||
pytest==5.2.0
|
pytest==5.2.1
|
||||||
pytest-cov==2.7.1
|
pytest-cov==2.7.1
|
||||||
pytest-django==3.5.1
|
pytest-django==3.5.1
|
||||||
pytest-forked==1.0.2
|
pytest-forked==1.0.2
|
||||||
|
|
|
@ -10,13 +10,14 @@ certifi==2019.9.11
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
defusedxml==0.6.0
|
defusedxml==0.6.0
|
||||||
dj-database-url==0.5.0
|
dj-database-url==0.5.0
|
||||||
Django==1.11.24
|
Django==1.11.25
|
||||||
django-allauth==0.40.0
|
django-allauth==0.40.0
|
||||||
django-appconf==1.0.3
|
django-appconf==1.0.3
|
||||||
django-avatar==4.1.0
|
django-avatar==4.1.0
|
||||||
django-compressor==2.3
|
django-compressor==2.3
|
||||||
django-crispy-forms==1.7.2
|
django-crispy-forms==1.7.2
|
||||||
django-csp==3.5
|
django-csp==3.5
|
||||||
|
django-debug-toolbar==2.0
|
||||||
django-filter==2.2.0
|
django-filter==2.2.0
|
||||||
django-jsonfield==1.3.1
|
django-jsonfield==1.3.1
|
||||||
django-redis-cache==2.0.0
|
django-redis-cache==2.0.0
|
||||||
|
@ -38,13 +39,13 @@ monotonic==1.5
|
||||||
more-itertools==7.2.0
|
more-itertools==7.2.0
|
||||||
mysqlclient==1.4.4
|
mysqlclient==1.4.4
|
||||||
oauthlib==3.1.0
|
oauthlib==3.1.0
|
||||||
Pillow==6.1.0
|
Pillow==6.2.0
|
||||||
PyJWT==1.7.1
|
PyJWT==1.7.1
|
||||||
python-dateutil==2.8.0
|
python-dateutil==2.8.0
|
||||||
python-decouple==3.1
|
python-decouple==3.1
|
||||||
python-dotenv==0.10.3
|
python-dotenv==0.10.3
|
||||||
python3-openid==3.1.0
|
python3-openid==3.1.0
|
||||||
pytz==2019.2
|
pytz==2019.3
|
||||||
PyYAML==5.1.2
|
PyYAML==5.1.2
|
||||||
rcssmin==1.0.6
|
rcssmin==1.0.6
|
||||||
redis==3.3.8
|
redis==3.3.8
|
||||||
|
@ -53,13 +54,14 @@ requests-oauthlib==1.2.0
|
||||||
rjsmin==1.1.0
|
rjsmin==1.1.0
|
||||||
satellitetle==0.7.0
|
satellitetle==0.7.0
|
||||||
satnogs-decoders~=1.0
|
satnogs-decoders~=1.0
|
||||||
sentry-sdk==0.12.2
|
sentry-sdk==0.12.3
|
||||||
sgp4==1.4
|
sgp4==1.4
|
||||||
shortuuid==0.5.0
|
shortuuid==0.5.0
|
||||||
simplejson==3.16.0
|
simplejson==3.16.0
|
||||||
six==1.12.0
|
six==1.12.0
|
||||||
social-auth-app-django==3.1.0
|
social-auth-app-django==3.1.0
|
||||||
social-auth-core==3.2.0
|
social-auth-core==3.2.0
|
||||||
|
sqlparse==0.3.0
|
||||||
Unipath==1.1
|
Unipath==1.1
|
||||||
uritemplate==3.0.0
|
uritemplate==3.0.0
|
||||||
urllib3==1.24.3
|
urllib3==1.24.3
|
||||||
|
|
|
@ -63,6 +63,8 @@ install_requires =
|
||||||
simplejson~=3.16.0
|
simplejson~=3.16.0
|
||||||
uritemplate~=3.0.0
|
uritemplate~=3.0.0
|
||||||
PyYAML~=5.1.0
|
PyYAML~=5.1.0
|
||||||
|
# Debugging
|
||||||
|
django-debug-toolbar~=2.0.0
|
||||||
# Conflict workarounds
|
# Conflict workarounds
|
||||||
# django-allauth - sentry-sdk
|
# django-allauth - sentry-sdk
|
||||||
urllib3<1.25
|
urllib3<1.25
|
||||||
|
|
Loading…
Reference in New Issue