r1085@denkpolster: jan | 2008-04-04 22:07:37 +0200
work on SQLite support (fixes #9) * correctly handle unicode output of SQLite (gpgmail.py) * only use schema for PostgreSQL databases (settings.py) * make SQLite and PostgreSQL mandatory (migrate.cfg) * add SQLite SQL to database version 1 of dbrepo git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/trunk@249 a67ec6bc-e5d5-0310-a910-815c51eb3124
This commit is contained in:
parent
4ae866c559
commit
cccc6b8fe3
5 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,4 @@
|
|||
# -*- python -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2007, 2008 by Jan Dittberner.
|
||||
|
@ -23,13 +24,16 @@ import ConfigParser, os, string, logging.config
|
|||
|
||||
# global settings which must not be user configurable
|
||||
required_version = 3
|
||||
dbschema = 'gva'
|
||||
|
||||
# load user configuration
|
||||
config = ConfigParser.ConfigParser()
|
||||
config.readfp(open('gnuviechadmin/defaults.cfg'))
|
||||
config.read(['gnuviechadmin/gva.cfg', os.path.expanduser('~/.gva.cfg')])
|
||||
|
||||
dbschema = None
|
||||
if config.get('database', 'uri').startswith('postgres://'):
|
||||
dbschema = 'gva'
|
||||
|
||||
def get_template_dir(dirname):
|
||||
"""Returns the template directory for the given directory."""
|
||||
templatepath = config.get('common', 'templatedir')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue