aboutsummaryrefslogtreecommitdiff
path: root/rpkid/portal-gui/settings.py.in
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2012-04-15 04:42:40 +0000
committerRob Austein <sra@hactrn.net>2012-04-15 04:42:40 +0000
commitfd695c2371824c1952510bab9fbe0e05b52b9e9d (patch)
tree60b9836b9d24055d900be3335856ec4e0091cec2 /rpkid/portal-gui/settings.py.in
parentb5eb637d68bd8387cfff7cb06945f6654d1192db (diff)
parentf4d381b2ead3a3fab4b7b0c73cdc8d3a6b4cb12d (diff)
Merge branches/tk161 to trunk.
svn path=/trunk/; revision=4415
Diffstat (limited to 'rpkid/portal-gui/settings.py.in')
-rw-r--r--rpkid/portal-gui/settings.py.in38
1 files changed, 27 insertions, 11 deletions
diff --git a/rpkid/portal-gui/settings.py.in b/rpkid/portal-gui/settings.py.in
index 2800bc24..186f3f1d 100644
--- a/rpkid/portal-gui/settings.py.in
+++ b/rpkid/portal-gui/settings.py.in
@@ -6,13 +6,33 @@
# DO NOT EDIT! This file is automatically generated from
# settings.py.in
+import rpki.config
+
DEBUG = True
TEMPLATE_DEBUG = DEBUG
+# needs to be set prior to the call to rpki.config.parser so it knows
+# where to find the system rpki.conf
+rpki.config.default_dirname = '%(AC_SYSCONFDIR)s'
+
+# load the sql authentication bits from the system rpki.conf
+rpki_config = rpki.config.parser(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. The 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'
+ }
}
}
@@ -50,13 +70,14 @@ ROOT_URLCONF = 'rpki.gui.urls'
INSTALLED_APPS = (
'django.contrib.auth',
- 'django.contrib.admin',
- 'django.contrib.admindocs',
+ #'django.contrib.admin',
+ #'django.contrib.admindocs',
'django.contrib.contenttypes',
'django.contrib.sessions',
-# 'django.contrib.staticfiles',
+ 'rpki.irdb',
'rpki.gui.app',
- 'rpki.gui.cacheview'
+ 'rpki.gui.cacheview',
+ 'rpki.gui.routeview',
)
TEMPLATE_CONTEXT_PROCESSORS = (
@@ -67,8 +88,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",)