From 4999f8e4fdf9bf018224d588bdebdf326310115d Mon Sep 17 00:00:00 2001 From: Tom Offermann Date: Fri, 4 Oct 2013 10:51:51 -0700 Subject: [PATCH] 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. --- .../{{cookiecutter.repo_name}}/config/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py index cce2846d..446f26ef 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py @@ -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