forked from DGNum/gestioCOF
add a DJANGO_NO_DDT env variable to disable ddt
This commit is contained in:
parent
f3117c9e69
commit
fabb30cec2
2 changed files with 16 additions and 1 deletions
|
@ -3,6 +3,8 @@ Django development settings for the cof project.
|
|||
The settings that are not listed here are imported from .common
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from .common import * # NOQA
|
||||
from .common import INSTALLED_APPS, MIDDLEWARE, TESTING
|
||||
|
||||
|
@ -37,7 +39,8 @@ def show_toolbar(request):
|
|||
machine physique n'est pas forcément connue, et peut difficilement être
|
||||
mise dans les INTERNAL_IPS.
|
||||
"""
|
||||
return DEBUG and not request.path.startswith("/admin/")
|
||||
env_no_ddt = bool(os.environ.get("DJANGO_NO_DDT", None))
|
||||
return DEBUG and not env_no_ddt and not request.path.startswith("/admin/")
|
||||
|
||||
|
||||
if not TESTING:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue