summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d054b3f)
raw | patch | inline | side by side (parent: d054b3f)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 31 Mar 2004 23:07:51 +0000 (23:07 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 31 Mar 2004 23:07:51 +0000 (23:07 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2237 57a73879-2fb5-44c3-a270-3262357dd7e2
demo.py | patch | blob | history |
index a91be9d6bf33d6fc4f8f9e40579c5e256746c703..7d7f9479adb9f05e98adf162ae3334b15a169b6b 100644 (file)
--- a/demo.py
+++ b/demo.py
#
# Copyright (c) 2003 Richard Jones (richard@mechanicalcat.net)
#
-# $Id: demo.py,v 1.9 2004-03-24 05:39:47 richard Exp $
+# $Id: demo.py,v 1.10 2004-03-31 23:07:51 richard Exp $
import sys, os, string, re, urlparse
import shutil, socket, errno, BaseHTTPServer
# create the instance
if os.path.exists(home):
shutil.rmtree(home)
- from roundup import init, instance, password
+ from roundup import init, instance, password, backends
+
+ # see if we have further db nuking to perform
+ module = getattr(backends, backend)
+ if backend == 'mysql':
+ class config:
+ MYSQL_DBHOST = 'localhost'
+ MYSQL_DBUSER = 'rounduptest'
+ MYSQL_DBPASSWORD = 'rounduptest'
+ MYSQL_DBNAME = 'rounduptest'
+ DATABASE = 'home'
+ module.db_nuke(config)
+ elif backend == 'postgresql':
+ class config:
+ POSTGRESQL_DATABASE = {'database': 'rounduptest'}
+ DATABASE = 'home'
+ module.db_nuke(config, 1)
+
init.install(home, os.path.join('templates', 'classic'))
# don't have email flying around
os.remove(os.path.join(home, 'detectors', 'nosyreaction.py'))