From 7ab93691b4b6a45e99f78b37796413c5f24629a4 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Mon, 4 Aug 2008 22:28:18 -0400 Subject: [PATCH] more sipb_xen_database -> invirt.database in web svn path=/trunk/packages/sipb-xen-www/; revision=864 --- code/main.py | 7 +++---- code/templates/functions.tmpl | 6 +++--- code/webcommon.py | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/code/main.py b/code/main.py index a9e54a8..8506ee5 100755 --- a/code/main.py +++ b/code/main.py @@ -39,8 +39,7 @@ import cache_acls from webcommon import InvalidInput, CodeError, State import controls from getafsgroups import getAfsGroupMembers -import sipb_xen_database -from invirt import database +import sipb_xen_database as database from sipb_xen_database import Machine, CDROM, ctx, connect, MachineAccess, Type, Autoinstall from invirt.config import structs as config @@ -85,7 +84,7 @@ def makeErrorPre(old, addition): else: return '

STDERR:

' + str(addition) + '
' -Template.sipb_xen_database = sipb_xen_database +Template.database = database Template.helppopup = staticmethod(helppopup) Template.err = None @@ -678,7 +677,7 @@ class App: def __iter__(self): start_time = time.time() - sipb_xen_database.clear_cache() + database.clear_cache() sys.stderr = StringIO() fields = cgi.FieldStorage(fp=self.environ['wsgi.input'], environ=self.environ) operation = self.environ.get('PATH_INFO', '') diff --git a/code/templates/functions.tmpl b/code/templates/functions.tmpl index 635f5db..9bf6cf8 100644 --- a/code/templates/functions.tmpl +++ b/code/templates/functions.tmpl @@ -20,14 +20,14 @@ onchange="$onchange"#slurp #def cdromList($default="", $onchange=None) #filter None -$databaseList(sorted($sipb_xen_database.CDROM.select(), key=lambda x: x.description), +$databaseList(sorted($database.CDROM.select(), key=lambda x: x.description), default, onchange, 'cdrom', 'cdromlist', 'cdrom_id', 'description') #end filter #end def #def autoList($default="", $onchange=None) #filter None -$databaseList(sorted($sipb_xen_database.Autoinstall.select(), key=lambda x: x.description), +$databaseList(sorted($database.Autoinstall.select(), key=lambda x: x.description), default, onchange, 'autoinstall', 'autoinstalllist', 'autoinstall_id', 'description') #end filter #end def @@ -60,4 +60,4 @@ $databaseList(sorted($sipb_xen_database.Autoinstall.select(), key=lambda x: x.de #filter None $full_body #end filter -#end filter \ No newline at end of file +#end filter diff --git a/code/webcommon.py b/code/webcommon.py index ce0ddc7..0449046 100644 --- a/code/webcommon.py +++ b/code/webcommon.py @@ -1,7 +1,7 @@ """Exceptions for the web interface.""" import time -from sipb_xen_database import Machine, MachineAccess +from invirt.database import Machine, MachineAccess class MyException(Exception): """Base class for my exceptions""" -- 1.7.9.5