diff --git a/data/dbrepo/migrate.cfg b/data/dbrepo/migrate.cfg index 78ae1b2..05903ba 100644 --- a/data/dbrepo/migrate.cfg +++ b/data/dbrepo/migrate.cfg @@ -17,4 +17,4 @@ version_table=migrate_version # entire commit will fail. List the databases your application will actually # be using to ensure your updates to that database work properly. # This must be a list; example: ['postgres','sqlite'] -required_dbs=[] +required_dbs=['postgres', 'sqlite'] diff --git a/data/dbrepo/versions/1/1.sqlite.downgrade.sql b/data/dbrepo/versions/1/1.sqlite.downgrade.sql new file mode 100644 index 0000000..e69de29 diff --git a/data/dbrepo/versions/1/1.sqlite.upgrade.sql b/data/dbrepo/versions/1/1.sqlite.upgrade.sql new file mode 100644 index 0000000..e69de29 diff --git a/gnuviechadmin/backend/settings.py b/gnuviechadmin/backend/settings.py index ebf8420..08217ee 100644 --- a/gnuviechadmin/backend/settings.py +++ b/gnuviechadmin/backend/settings.py @@ -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') diff --git a/gnuviechadmin/util/gpgmail.py b/gnuviechadmin/util/gpgmail.py index 9964744..c3ddcab 100644 --- a/gnuviechadmin/util/gpgmail.py +++ b/gnuviechadmin/util/gpgmail.py @@ -1,6 +1,7 @@ -# -*- coding: UTF-8 -*- +# -*- python -*- +# -*- coding: utf-8 -*- # -# Copyright (C) 2007 by Jan Dittberner. +# Copyright (C) 2007, 2008 by Jan Dittberner. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,6 +31,8 @@ def send_mail(subject, text): """This method sends a mail with the given text and subject and signs it usign GnuPG. If a public key of the recipient is available the mail is encrypted.""" + if not text.__class__.__name__ == 'str': + text = text.encode('ascii', 'replace') plain = core.Data(text) cipher = core.Data() c = core.Context()