Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

Commit

Permalink
Merge branch 'develop' into performance-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lowitea authored Dec 1, 2020
2 parents 6a53142 + c194e33 commit 3cffd5d
Show file tree
Hide file tree
Showing 4 changed files with 367 additions and 119 deletions.
7 changes: 7 additions & 0 deletions parrot/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

INSTALLED_APPS = [
'simpleui',
'django_extensions',

'django.contrib.admin',
'django.contrib.auth',
Expand All @@ -36,6 +37,10 @@
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

if DEBUG:
INSTALLED_APPS.append('debug_toolbar')
MIDDLEWARE.append('debug_toolbar.middleware.DebugToolbarMiddleware')

ROOT_URLCONF = 'parrot.urls'

TEMPLATES = [
Expand Down Expand Up @@ -108,3 +113,5 @@
'Stubs': 'fas fa-feather-alt',
'Logs': 'fas fa-layer-group',
}

INTERNAL_IPS = env.list('PARROT_INTERNAL_HOSTS', default=['127.0.0.1'])
6 changes: 5 additions & 1 deletion parrot/urls.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import re

import debug_toolbar
from django.conf import settings
from django.contrib import admin
from django.shortcuts import redirect
from django.urls import path, re_path
from django.urls import include, path, re_path
from django.views import static

from http_stubs import views
Expand All @@ -25,3 +26,6 @@
urlpatterns += [
path('<path:path>', views.HTTPStubView.as_view()),
]

if settings.DEBUG:
urlpatterns.insert(0, path('__debug__/', include(debug_toolbar.urls)))
Loading

0 comments on commit 3cffd5d

Please sign in to comment.