4 usage: %(progname)s [args] 7 import os, sys, string, time, getopt, re
10 import neo_cgi, neo_util, neo_cs
12 from pyclearsilver
import CSPage
13 from pyclearsilver
import odb
22 self.
db = db_webui.initSchema()
23 self.
appgroup = self.db.appgroups.lookup(id=hdf.getValue(
"Query.id",
""))
24 self.
appids = self.appgroup.appIdList()
27 webutil.set_tabs(hdf, [
"apps",
"appgroup"])
33 prefix =
"CGI.cur.app_group.apps.%s" % i
34 hdf.setValue(prefix +
"." +
"taskid", taskid)
35 for key, val
in doc.items():
37 hdf.setValue(prefix +
"." + key, val)
39 hdf.setValue(prefix +
"." + key,
'')
42 self.appgroup.hdfExport(
"CGI.cur.app_group", hdf)
45 apps = webutil.list_apps()
48 taskid = db_webui.path2taskid(appfn)
49 prefix =
"CGI.cur.available_apps.%d" % n
51 doc = _app.load_yaml()
57 hdf.setValue(prefix +
"." +
"taskid", taskid)
58 for key, val
in doc.items():
60 hdf.setValue(prefix +
"." + key, val)
62 hdf.setValue(prefix +
"." + key,
'')
65 taskid = hdf.getValue(
"Query.taskid",
"")
67 if taskid
not in self.
appids:
68 user_id = self.authdb.users.lookup(hdf.getValue(
"CGI.Login",
"")).uid
70 self.appids.append(taskid)
71 self.appgroup.appids = string.join(self.
appids,
',')
76 return MyPage(context, pagename=
"appgroup", nologin=
False)
79 context = CSPage.Context()
82 if __name__ ==
"__main__":
def Action_AddApp(self, hdf)