Ajout des applis bootstrap et ddt
Installées comme requirements mais précédemment non incluses dans settings.INSTALLED_APPS
This commit is contained in:
parent
9380d54981
commit
1bab75d13e
1 changed files with 26 additions and 13 deletions
|
@ -37,6 +37,8 @@ INSTALLED_APPS = [
|
|||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'bootstrapform',
|
||||
'debug_toolbar',
|
||||
]
|
||||
|
||||
MIDDLEWARE_CLASSES = [
|
||||
|
@ -95,23 +97,17 @@ DATABASES = {
|
|||
}
|
||||
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
|
||||
|
||||
AUTH_PASSWORD_VALIDATORS = [
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||
},
|
||||
{'NAME': 'django.contrib.auth.password_validation'
|
||||
'.UserAttributeSimilarityValidator'},
|
||||
{'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator'},
|
||||
{'NAME': 'django.contrib.auth.password_validation'
|
||||
'.CommonPasswordValidator'},
|
||||
{'NAME': 'django.contrib.auth.password_validation'
|
||||
'.NumericPasswordValidator'},
|
||||
]
|
||||
|
||||
|
||||
|
@ -133,3 +129,20 @@ USE_TZ = True
|
|||
# https://docs.djangoproject.com/en/1.9/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
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.
|
||||
"""
|
||||
if not DEBUG:
|
||||
return False
|
||||
if request.is_ajax():
|
||||
return False
|
||||
return True
|
||||
|
||||
DEBUG_TOOLBAR_CONFIG = {
|
||||
'SHOW_TOOLBAR_CALLBACK': show_toolbar,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue