45 lines
981 B
Python
45 lines
981 B
Python
|
"""
|
||
|
Django development settings for GestionÉvénementiel
|
||
|
The settings that are not listed here are imported from .common
|
||
|
"""
|
||
|
|
||
|
from .common import * # NOQA
|
||
|
|
||
|
|
||
|
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||
|
|
||
|
DEBUG = True
|
||
|
|
||
|
# Add some debugging tools
|
||
|
INSTALLED_APPS += ["debug_toolbar", "debug_panel"] # NOQA
|
||
|
MIDDLEWARE_CLASSES = (
|
||
|
["debug_panel.middleware.DebugPanelMiddleware"]
|
||
|
+ MIDDLEWARE_CLASSES # NOQA
|
||
|
)
|
||
|
|
||
|
|
||
|
# ---
|
||
|
# Nginx static/media config
|
||
|
# ---
|
||
|
|
||
|
STATIC_ROOT = "/srv/GE/static/"
|
||
|
MEDIA_ROOT = "/srv/GE/media/"
|
||
|
|
||
|
|
||
|
# ---
|
||
|
# Debug tool bar
|
||
|
# ---
|
||
|
|
||
|
def show_toolbar(request):
|
||
|
"""
|
||
|
On ne veut pas la vérification de INTERNAL_IPS faite par la debug-toolbar
|
||
|
car cela interfère avec l'utilisation de Vagrant. En effet, l'adresse de la
|
||
|
machine physique n'est pas forcément connue, et peut difficilement être
|
||
|
mise dans les INTERNAL_IPS.
|
||
|
"""
|
||
|
return DEBUG # True
|
||
|
|
||
|
DEBUG_TOOLBAR_CONFIG = {
|
||
|
'SHOW_TOOLBAR_CALLBACK': show_toolbar,
|
||
|
}
|