Commit cea1b5f4 by Őry Máté

circle: allow adding site-local templates + static files

parent a29ad2f0
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
# flake8: noqa # flake8: noqa
from os import environ from os import environ
from os.path import (abspath, basename, dirname, join, normpath, isfile, from os.path import (abspath, basename, dirname, join, normpath, isfile,
expanduser) exists, expanduser)
from sys import path from sys import path
from subprocess import check_output from subprocess import check_output
from uuid import getnode from uuid import getnode
...@@ -161,6 +161,10 @@ STATICFILES_FINDERS = ( ...@@ -161,6 +161,10 @@ STATICFILES_FINDERS = (
) )
########## END STATIC FILE CONFIGURATION ########## END STATIC FILE CONFIGURATION
p = join(dirname(SITE_ROOT), 'site-circle/static')
if exists(p):
STATICFILES_DIRS = (p, )
########## SECRET CONFIGURATION ########## SECRET CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key # See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
...@@ -208,6 +212,7 @@ TEMPLATE_LOADERS = ( ...@@ -208,6 +212,7 @@ TEMPLATE_LOADERS = (
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
TEMPLATE_DIRS = ( TEMPLATE_DIRS = (
normpath(join(SITE_ROOT, 'templates')), normpath(join(SITE_ROOT, 'templates')),
join(dirname(SITE_ROOT), 'site-circle/templates'),
) )
########## END TEMPLATE CONFIGURATION ########## END TEMPLATE CONFIGURATION
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment