Author: justi9
Date: 2007-11-13 19:54:29 -0500 (Tue, 13 Nov 2007)
New Revision: 1310
Modified:
mgmt/cumin/python/cumin/__init__.py
mgmt/cumin/python/cumin/brokergroup.py
Log:
Adds a bit of logic to add a MgmtSystem if it isn't already there.
Fixes a leftover buglet from the Widget.parent rename.
Modified: mgmt/cumin/python/cumin/__init__.py
===================================================================
--- mgmt/cumin/python/cumin/__init__.py 2007-11-14 00:43:49 UTC (rev 1309)
+++ mgmt/cumin/python/cumin/__init__.py 2007-11-14 00:54:29 UTC (rev 1310)
@@ -6,6 +6,9 @@
from wooly.server import WebServer
from wooly.devel import DevelPage
from wooly.parameters import IntegerParameter
+from mint import *
+from mint.schema import *
+from sqlobject.main import *
from model import CuminModel
from demo import DemoData
@@ -27,6 +30,16 @@
self.model = model
+ self.mint = MintModel()
+
+ try:
+ sys = MgmtSystem.get(1)
+ except SQLObjectNotFound:
+ sys = MgmtSystem()
+ sys.set(sysIdent=0, idOriginal=0)
+
+ self.model.sys = sys
+
self.cumin_page = CuminPage(self, "cumin.html")
self.set_default_page(self.cumin_page)
Modified: mgmt/cumin/python/cumin/brokergroup.py
===================================================================
--- mgmt/cumin/python/cumin/brokergroup.py 2007-11-14 00:43:49 UTC (rev 1309)
+++ mgmt/cumin/python/cumin/brokergroup.py 2007-11-14 00:54:29 UTC (rev 1310)
@@ -135,7 +135,7 @@
def process_cancel(self, session, group):
branch = session.branch()
- self.parent.show_view(branch)
+ self.parent().show_view(branch)
self.page().set_redirect_url(session, branch.marshal())
def process_submit(self, session, group):
Show replies by date