本文整理汇总了Python中activity.Activity.as_view方法的典型用法代码示例。如果您正苦于以下问题:Python Activity.as_view方法的具体用法?Python Activity.as_view怎么用?Python Activity.as_view使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类activity.Activity
的用法示例。
在下文中一共展示了Activity.as_view方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from activity import Activity [as 别名]
# 或者: from activity.Activity import as_view [as 别名]
# app.add_url_rule('/questionaire/onboarding/',
# view_func=Qonboarding.as_view('questionnaire-onboarding'),
# methods=["GET", "POST"])
# app.add_url_rule('/questionaire/24hfood/',
# view_func=Q24hfood.as_view('questionnaire-24hfood'),
# methods=["GET", "POST"])
# app.add_url_rule('/input/insidetracker/',
# view_func=QInsideTracker.as_view('input-insidetracker'),
# methods=["GET", "POST"])
# Physical Measurements Views
app.add_url_rule('/physical/',
view_func=Physical.as_view('physical'),
methods=["GET", "POST"])
app.add_url_rule('/activity/',
view_func=Activity.as_view('activity'),
methods=["GET", "POST"])
app.add_url_rule('/nutrition/',
view_func=Nutrition.as_view('nutrition'),
methods=["GET", "POST"])
# app.add_url_rule('/coach/physical/',
# view_func=coachPhysical.as_view('coach-physical'),
# methods=["GET", "POST"])
# app.add_url_rule('/client/physical/',
# view_func=clientPhysical.as_view('client-physical'),
# methods=["GET", "POST"])
# app.add_url_rule('/gformPhysical/',
# view_func=gformPhysical.as_view('gformphysical'),
# methods=["GET", "POST"])