本文整理匯總了Python中gluon.DIV屬性的典型用法代碼示例。如果您正苦於以下問題:Python gluon.DIV屬性的具體用法?Python gluon.DIV怎麽用?Python gluon.DIV使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類gluon
的用法示例。
在下文中一共展示了gluon.DIV屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: login_form
# 需要導入模塊: import gluon [as 別名]
# 或者: from gluon import DIV [as 別名]
def login_form(self):
"""
Combine the auth() form with alt_login_form.
If signals are set and a parameter in request matches any signals,
it will return the call of alt_login_form.login_form instead.
So alt_login_form can handle some particular situations, for example,
multiple steps of OpenID login inside alt_login_form.login_form.
Otherwise it will render the normal login form combined with
alt_login_form.login_form.
"""
request = current.request
args = request.args
if (self.signals and
any([True for signal in self.signals if signal in request.vars])
):
return self.alt_login_form.login_form()
self.auth.settings.login_form = self.auth
form = DIV(self.auth())
self.auth.settings.login_form = self
form.components.append(self.alt_login_form.login_form())
return form