def view_app(app):
user = root.authorized()
if app: root.set_active(app)
else: redirect('/myapps')
if user != 'admin':
return template('error', err="must be admin to edit app")
cid = request.query.cid
result = db(apps.name==app).select().first()
params = {}
params['app'] = app
params['user'] = user
params['cid'] = cid
#if request.query.edit:
# return template('appedit', params, rows=result)
#else:
try:
return template('app', params, rows=result)
except:
exc_type, exc_value, exc_traceback = sys.exc_info()
print traceback.print_exception(exc_type, exc_value, exc_traceback)
return template('error', err="there was a problem showing the app template. Check traceback.")
评论列表
文章目录