diff options
Diffstat (limited to 'rpkid/portal-gui/settings.py.in')
-rw-r--r-- | rpkid/portal-gui/settings.py.in | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/rpkid/portal-gui/settings.py.in b/rpkid/portal-gui/settings.py.in index 2800bc24..8e04ef62 100644 --- a/rpkid/portal-gui/settings.py.in +++ b/rpkid/portal-gui/settings.py.in @@ -6,13 +6,27 @@ # DO NOT EDIT! This file is automatically generated from # settings.py.in +import rpki.config + DEBUG = True TEMPLATE_DEBUG = DEBUG +RPKI_CONFIG = '/usr/local/var/rpki/conf/SPARTA/rpki.conf' + +rpki_config = rpki.config.parser(filename=RPKI_CONFIG, section='web_portal') + DATABASES = { 'default' : { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME' : '%(AC_DATABASE_PATH)s' + 'ENGINE': 'django.db.backends.mysql', + 'NAME' : rpki_config.get('sql-database'), + 'USER' : rpki_config.get('sql-username'), + 'PASSWORD': rpki_config.get('sql-password'), + # ensure the default storage engine is InnoDB since we need foreign key support + # django documentation suggests removing this after the syncdb is performed + # as an optimization, but there isn't an easy way to do this automatically. + 'OPTIONS' : { + 'init_command': 'SET storage_engine=INNODB' + } } } @@ -54,7 +68,6 @@ INSTALLED_APPS = ( 'django.contrib.admindocs', 'django.contrib.contenttypes', 'django.contrib.sessions', -# 'django.contrib.staticfiles', 'rpki.gui.app', 'rpki.gui.cacheview' ) @@ -67,8 +80,3 @@ TEMPLATE_CONTEXT_PROCESSORS = ( "django.contrib.messages.context_processors.messages", "django.core.context_processors.request" ) - -#STATIC_URL = '/static/' -#STATIC_ROOT = '%(AC_DATAROOTDIR)s/rpki/gui/static' -#STATICFILES_DIRS = (("admin", "%(AC_DJANGO_DIR)s/contrib/admin/media"),) -#STATICFILES_FINDERS = ("django.contrib.staticfiles.finders.FileSystemFinder",) |