Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jovuit
funkwhale
Commits
c4334454
Verified
Commit
c4334454
authored
Nov 28, 2019
by
Eliot Berriot
Browse files
Added django-silk for easier local debugging / profiling
parent
85dafcb6
Changes
3
Hide whitespace changes
Inline
Side-by-side
api/config/settings/common.py
View file @
c4334454
...
...
@@ -213,16 +213,19 @@ if PLUGINS:
else
:
logger
.
info
(
"Running with no plugins"
)
ADDITIONAL_APPS
=
env
.
list
(
"ADDITIONAL_APPS"
,
default
=
[])
INSTALLED_APPS
=
(
DJANGO_APPS
+
THIRD_PARTY_APPS
+
LOCAL_APPS
+
tuple
([
"{}.apps.Plugin"
.
format
(
p
)
for
p
in
PLUGINS
])
+
tuple
(
ADDITIONAL_APPS
)
)
# MIDDLEWARE CONFIGURATION
# ------------------------------------------------------------------------------
MIDDLEWARE
=
(
ADDITIONAL_MIDDLEWARES_BEFORE
=
env
.
list
(
"ADDITIONAL_MIDDLEWARES_BEFORE"
,
default
=
[])
MIDDLEWARE
=
tuple
(
ADDITIONAL_MIDDLEWARES_BEFORE
)
+
(
"django.middleware.security.SecurityMiddleware"
,
"django.middleware.clickjacking.XFrameOptionsMiddleware"
,
"corsheaders.middleware.CorsMiddleware"
,
...
...
api/config/urls.py
View file @
c4334454
...
...
@@ -40,3 +40,8 @@ if settings.DEBUG:
urlpatterns
=
[
path
(
"api/__debug__/"
,
include
(
debug_toolbar
.
urls
))
]
+
urlpatterns
if
"silk"
in
settings
.
INSTALLED_APPS
:
urlpatterns
=
[
url
(
r
"^api/silk/"
,
include
(
"silk.urls"
,
namespace
=
"silk"
))
]
+
urlpatterns
api/requirements/local.txt
View file @
c4334454
...
...
@@ -15,3 +15,4 @@ profiling
asynctest==0.12.2
aioresponses==0.6.0
https://github.com/dmclain/django-debug-toolbar-line-profiler/archive/master.zip
django-silk
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment