File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 11import os
2-
2+ import socket
33
44DEBUG = True
55
1313 'PORT' : '' , # Set to empty string for default. Not used with sqlite3.
1414 }
1515}
16+ DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
1617
1718# Local time zone for this installation. Choices can be found here:
1819# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
8081TEMPLATES = [
8182 {
8283 'BACKEND' : 'django.template.backends.django.DjangoTemplates' ,
84+ 'APP_DIRS' : True ,
8385 'OPTIONS' : {
84- 'loaders' : [
85- 'django.template.loaders.filesystem.Loader' ,
86- 'django.template.loaders.app_directories.Loader' ,
87- ],
8886 'context_processors' : [
8987 'django.template.context_processors.debug' ,
9088 'django.template.context_processors.request' ,
9694]
9795
9896MIDDLEWARE = (
97+ 'debug_toolbar.middleware.DebugToolbarMiddleware' ,
9998 'django.middleware.common.CommonMiddleware' ,
10099 'django.contrib.sessions.middleware.SessionMiddleware' ,
101100 'django.middleware.csrf.CsrfViewMiddleware' ,
119118 'dummyapp' ,
120119 'django_rq' ,
121120 'cacheback' ,
121+ 'debug_toolbar' ,
122122)
123123
124- INTERNAL_IPS = ('10.0.2.2' ,)
124+ _ , _ , ips = socket .gethostbyname_ex (socket .gethostname ())
125+ INTERNAL_IPS = [ip [: ip .rfind ("." )] + ".1" for ip in ips ]
125126
126127# A sample logging configuration. The only tangible logging
127128# performed by this configuration is to send an email to
Original file line number Diff line number Diff line change 11from django .urls import path
2+ from debug_toolbar .toolbar import debug_toolbar_urls
23
34from dummyapp import views
45
56
67urlpatterns = [
78 path ('' , views .index , name = 'index' ),
8- ]
9+ ] + debug_toolbar_urls ()
You can’t perform that action at this time.
0 commit comments