本文整理匯總了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"])