From d4a2c1f8792f52fec0c881ab38c91635840a50c0 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 7 Apr 2015 22:20:53 +0100 Subject: Integrate 'django.contrib.staticfiles' Rather than providing a custom solution for serving static files, use the solution provided in the upstream Django source. This allows us to remove the top-level 'urls.py' file. Signed-off-by: Stephen Finucane Signed-off-by: Jeremy Kerr --- apps/settings.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'apps/settings.py') diff --git a/apps/settings.py b/apps/settings.py index dbe0544..01add3e 100644 --- a/apps/settings.py +++ b/apps/settings.py @@ -19,6 +19,7 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', + 'django.contrib.staticfiles', 'patchwork', ) @@ -78,7 +79,7 @@ USE_I18N = True # URLs -ROOT_URLCONF = 'urls' +ROOT_URLCONF = 'patchwork.urls' # Security @@ -99,8 +100,6 @@ TEMPLATE_DIRS = ( # https://docs.djangoproject.com/en/1.6/ref/settings/#auth # -ADMIN_MEDIA_PREFIX = '/media/' - LOGIN_URL = '/user/login/' LOGIN_REDIRECT_URL = '/user/' @@ -113,6 +112,18 @@ LOGIN_REDIRECT_URL = '/user/' SITE_ID = 1 +# +# Static files settings +# https://docs.djangoproject.com/en/1.6/ref/settings/#static-files +# + +STATIC_URL = '/static/' + +STATICFILES_DIRS = [ + os.path.join(ROOT_DIR, 'htdocs'), +] + + # # Patchwork settings # -- cgit v1.2.3