本文整理汇总了Python中Activity.createDB方法的典型用法代码示例。如果您正苦于以下问题:Python Activity.createDB方法的具体用法?Python Activity.createDB怎么用?Python Activity.createDB使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Activity
的用法示例。
在下文中一共展示了Activity.createDB方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: PermissionDeny
# 需要导入模块: import Activity [as 别名]
# 或者: from Activity import createDB [as 别名]
render._add_global(gantt_render,"ganttChart")
return render.project(project, editable)
class PermissionDeny(web.HTTPError):
def __init__(self):
status = '550 Permission Denied'
headers = {'Content-Type': 'text/html'}
user = user_session.get('user')
data = '<h1>Permission Denied</h1>\n<ul>\n'
data += ''.join('<li>{0}: {1}</li>\n'.format(key, user[key])
for key in user_session.get('user').keys())
data += '</ul>'
web.HTTPError.__init__(self, status, headers, data)
if __name__ == "__main__":
session = Activity.createDB('try')
'''##########March 10###################
fix_session = Activity.createSession("try")
projects = list(fix_session.query(Activity.Activity).filter(Activity.Activity.activity_type == "Project"))
for proj in projects:
tasks = list(fix_session.query(Activity.Assignment).filter(Activity.Assignment.activity_id == proj.objectId))
for (index, t) in enumerate(tasks):
t.sort_index = index + 1
fix_session.commit()
print "fix finished"
'''###########################
app.internalerror = web.debugerror
app.run()