blob: f71073ac05b9a9fd9998a8a3284c5a4e7221d25e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
"""
This module contains utility functions for use in standalone scripts.
"""
from django.conf import settings
from rpki.config import parser
__version__ = '$Id$'
def setup():
"""
Configure Django enough to use the ORM.
"""
cfg = parser(section='web_portal')
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': cfg.get('sql-database'),
'USER': cfg.get('sql-username'),
'PASSWORD': cfg.get('sql-password'),
}
},
INSTALLED_APPS=(
'rpki.gui.app',
'rpki.gui.cacheview',
'rpki.gui.routeview',
'rpki.irdb'
)
)
|