mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-23 23:12:57 +03:00
Fix static paths in settings.py.
* STATIC_ROOT is at the same level as BASE_DIR, not in the BASE_DIR. * STATIC_ROOT is set as an absolute path. * Set STATICFILES_DIRS so collectstatic looks in `BASE_DIR/static`, not `BASE_DIR/../static`. Fixes #11.
This commit is contained in:
parent
04e99e392b
commit
4999f8e4fd
|
@ -183,14 +183,14 @@ class Common(Configuration):
|
|||
|
||||
########## STATIC FILE CONFIGURATION
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root
|
||||
STATIC_ROOT = 'staticfiles'
|
||||
STATIC_ROOT = join(os.path.dirname(BASE_DIR), 'staticfiles')
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS
|
||||
STATICFILES_DIRS = (
|
||||
join(BASE_DIR, '..', 'static'),
|
||||
join(BASE_DIR, 'static'),
|
||||
)
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
|
||||
|
|
Loading…
Reference in New Issue
Block a user