From 7311c66eefc842cdb41468a9911b3b36976d3047 Mon Sep 17 00:00:00 2001 From: Carlos Oliveira Date: Thu, 4 Jun 2015 11:42:56 -0300 Subject: [PATCH] Made it load custom static/templates first --- colab/settings.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/colab/settings.py b/colab/settings.py index 77eb8d3..a0add0f 100644 --- a/colab/settings.py +++ b/colab/settings.py @@ -222,14 +222,6 @@ AUTHENTICATION_BACKENDS = ( 'colab.accounts.auth.ColabBrowserIDBackend', ) -STATICFILES_DIRS = ( - os.path.join(BASE_DIR, 'static'), -) - -TEMPLATE_DIRS = ( - os.path.join(BASE_DIR, 'templates'), -) - LOCALE_PATHS = ( os.path.join(BASE_DIR, 'locale'), ) @@ -317,8 +309,16 @@ for app_name, app in COLAB_APPS.items(): if context_processor not in TEMPLATE_CONTEXT_PROCESSORS: TEMPLATE_CONTEXT_PROCESSORS += (context_processor,) -colab_templates = locals().get('COLAB_TEMPLATES') or {} -colab_statics = locals().get('COLAB_STATICS') or {} +colab_templates = locals().get('COLAB_TEMPLATES') or () +colab_statics = locals().get('COLAB_STATICS') or [] -TEMPLATE_DIRS += tuple(colab_templates) -STATICFILES_DIRS += tuple(colab_statics) +TEMPLATE_DIRS = tuple(colab_templates) +STATICFILES_DIRS = list(colab_statics) + +STATICFILES_DIRS += [ + os.path.join(BASE_DIR, 'static'), +] + +TEMPLATE_DIRS += ( + os.path.join(BASE_DIR, 'templates'), +) -- libgit2 0.21.2