mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2024-11-17 04:09:25 +08:00
Properly disable silk when not in DEBUG and enable whitenoise only on prod
This commit is contained in:
parent
08f68c0b0a
commit
d491590417
1 changed files with 1 additions and 2 deletions
|
@ -83,7 +83,7 @@ EMAIL_ADDRESS = (get_secret('EMAIL_ADDRESS') == 'True')
|
|||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'silk',
|
||||
'silk' if DEBUG else None,
|
||||
'config',
|
||||
'unfold',
|
||||
'unfold.contrib.filters',
|
||||
|
@ -118,7 +118,6 @@ INSTALLED_APPS = [
|
|||
if DEBUG:
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
"whitenoise.middleware.WhiteNoiseMiddleware",
|
||||
"silk.middleware.SilkyMiddleware",
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"corsheaders.middleware.CorsMiddleware",
|
||||
|
|
Loading…
Reference in a new issue