diff options
author | Michael Elkins <melkins@tislabs.com> | 2013-04-04 16:45:15 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2013-04-04 16:45:15 +0000 |
commit | 1ca9da5841168ee1f3ef3d45ccdcdf46357c5e21 (patch) | |
tree | 8a626e6923a91a8aea71c3cf3e5f2572b281f779 /rpkid | |
parent | df1985b97e16ca937bed6e173715810e0f4c3b6d (diff) |
set settings.STATIC_ROOT from rpki.autoconf.datarootdir instead of substituting it at build time
svn path=/trunk/; revision=5274
Diffstat (limited to 'rpkid')
-rw-r--r-- | rpkid/Makefile.in | 2 | ||||
-rw-r--r-- | rpkid/portal-gui/default_settings.py | 6 | ||||
-rw-r--r-- | rpkid/portal-gui/settings.py.in | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/rpkid/Makefile.in b/rpkid/Makefile.in index b0fc8201..6bcd03e9 100644 --- a/rpkid/Makefile.in +++ b/rpkid/Makefile.in @@ -227,8 +227,6 @@ COMPILE_PYTHON = \ COMPILE_SETTINGS = \ rm -f $@; \ AC_SECRET_KEY='${SECRET_KEY}' \ - AC_DATAROOTDIR='${datarootdir}' \ - AC_SYSCONFDIR='${sysconfdir}' \ ${PYTHON} ${abs_top_srcdir}/buildtools/subst-vars.py <$? >$@ rpki-sql-backup: rpki-sql-backup.py diff --git a/rpkid/portal-gui/default_settings.py b/rpkid/portal-gui/default_settings.py index ad89b6cf..3d3e3f51 100644 --- a/rpkid/portal-gui/default_settings.py +++ b/rpkid/portal-gui/default_settings.py @@ -4,6 +4,12 @@ This module contains static configuration settings for the web portal. __version__ = '$Id$' +import os +from rpki import autoconf + +# where to put static files +STATIC_ROOT = autoconf.datarootdir + '/rpki/media' + # must end with a slash! STATIC_URL = '/media/' diff --git a/rpkid/portal-gui/settings.py.in b/rpkid/portal-gui/settings.py.in index 7eb3f308..f352874d 100644 --- a/rpkid/portal-gui/settings.py.in +++ b/rpkid/portal-gui/settings.py.in @@ -94,9 +94,6 @@ TEMPLATE_CONTEXT_PROCESSORS = ( "django.core.context_processors.static" ) -# where to put static files -STATIC_ROOT = '%(AC_DATAROOTDIR)s/rpki/media' - try: from default_settings import * except: |