File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515
1616# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
1717BASE_DIR = os .path .dirname (os .path .dirname (__file__ ))
18+ PROJECT_ROOT = os .path .dirname (os .path .abspath (__file__ ))
1819
1920
2021# Quick-start development settings - unsuitable for production
8283 }
8384}
8485
86+ # Password validation
87+ # https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
88+
89+ AUTH_PASSWORD_VALIDATORS = [
90+ {
91+ 'NAME' : 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator' ,
92+ },
93+ {
94+ 'NAME' : 'django.contrib.auth.password_validation.MinimumLengthValidator' ,
95+ },
96+ {
97+ 'NAME' : 'django.contrib.auth.password_validation.CommonPasswordValidator' ,
98+ },
99+ {
100+ 'NAME' : 'django.contrib.auth.password_validation.NumericPasswordValidator' ,
101+ },
102+ ]
103+
85104# Internationalization
86105# https://docs.djangoproject.com/en/1.8/topics/i18n/
87106
106125# https://docs.djangoproject.com/en/1.8/howto/static-files/
107126
108127BASE_DIR = os .path .dirname (os .path .abspath (__file__ ))
109- STATIC_ROOT = 'staticfiles'
128+ STATIC_ROOT = os . path . join ( PROJECT_ROOT , 'staticfiles' )
110129STATIC_URL = '/static/'
111130
131+ # Extra places for collectstatic to find static files.
112132STATICFILES_DIRS = (
113- os .path .join (BASE_DIR , 'static' ),
133+ os .path .join (PROJECT_ROOT , 'static' ),
114134)
115135
116136# Simplified static file serving.
You can’t perform that action at this time.
0 commit comments