diff roundup/init.py @ 51:3a7e5515c1bd

ok, so now "./roundup-admin init" will ask questions... ...in an attempt to get a workable instance_home set up :) _and_ anydbm has had its first test :)
author Richard Jones <richard@users.sourceforge.net>
date Mon, 23 Jul 2001 08:45:28 +0000
parents c7c14960f413
children 5e71aaa87e5b
line wrap: on
line diff
--- a/roundup/init.py	Mon Jul 23 08:25:33 2001 +0000
+++ b/roundup/init.py	Mon Jul 23 08:45:28 2001 +0000
@@ -1,4 +1,4 @@
-# $Id: init.py,v 1.2 2001-07-22 12:09:32 richard Exp $
+# $Id: init.py,v 1.3 2001-07-23 08:45:28 richard Exp $
 
 import os, shutil, sys
 
@@ -31,7 +31,7 @@
         else:
             shutil.copy2(srcname, dstname)
 
-def init(instance, template, adminpw):
+def init(instance, template, backend, adminpw):
     ''' initialise an instance using the named template
     '''
     # first, copy the template dir over
@@ -39,6 +39,11 @@
     template = os.path.join(template_dir, 'templates', template)
     copytree(template, instance)
 
+    # now select database
+    db = '''# WARNING: DO NOT EDIT THIS FILE!!!
+from roundup.backends.back_%s import Database'''%backend
+    open(os.path.join(instance, 'select_db.py'), 'w').write(db)
+
     # now import the instance and call its init
     path, instance = os.path.split(instance)
     sys.path.insert(0, path)
@@ -47,4 +52,7 @@
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.2  2001/07/22 12:09:32  richard
+# Final commit of Grande Splite
 #
+#

Roundup Issue Tracker: http://roundup-tracker.org/