1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 15:15:22 +00:00

add dev options to settings + url

This commit is contained in:
catborise 2020-07-17 15:27:57 +03:00
parent 523f58b55e
commit b5b43b71bd
3 changed files with 28 additions and 3 deletions

View file

@ -9,3 +9,20 @@ from webvirtcloud.settings import *
DEBUG = True
TEMPLATE_DEBUG = True
INSTALLED_APPS += [
'debug_toolbar',
]
MIDDLEWARE += [
'debug_toolbar.middleware.DebugToolbarMiddleware',
]
# DebugToolBar
INTERNAL_IPS = (
'127.0.0.1',
)
DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False,
}

View file

@ -10,7 +10,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = ''
DEBUG = True
DEBUG = False
ALLOWED_HOSTS = ['*']

View file

@ -1,8 +1,9 @@
from django.conf import settings
from django.urls import include, path
from instances.views import index
from console.views import console
from appsettings.views import appsettings
from console.views import console
from instances.views import index
urlpatterns = [
path('', index, name='index'),
@ -16,3 +17,10 @@ urlpatterns = [
path('i18n/', include('django.conf.urls.i18n')),
path('logs/', include('logs.urls')),
]
if settings.DEBUG:
import debug_toolbar
urlpatterns += [
path('__debug__/', include(debug_toolbar.urls)),
]