本文整理匯總了Python中forms.SettingsForm.as_p方法的典型用法代碼示例。如果您正苦於以下問題:Python SettingsForm.as_p方法的具體用法?Python SettingsForm.as_p怎麽用?Python SettingsForm.as_p使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類forms.SettingsForm
的用法示例。
在下文中一共展示了SettingsForm.as_p方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: render
# 需要導入模塊: from forms import SettingsForm [as 別名]
# 或者: from forms.SettingsForm import as_p [as 別名]
def render(settings_id, data=None):
settings = PaymentSettings.objects.get(id=settings_id)
dict={'LMI_PAYMENT_AMOUNT': data['amount'], 'LMI_PAYMENT_DESC': data['description'], \
'LMI_PAYMENT_NO': data['id'], 'LMI_PAYEE_PURSE': settings.purse, \
'LMI_SUCCESS_URL': settings.success_url, 'LMI_FAIL_URL': settings.fail_url}
form = SettingsForm(initial=dict)
form = mark_safe("<form action='https://merchant.webmoney.ru/lmi/payment.asp' method='post' id='web_money_redirect_form'>"+form.as_p()+\
"<input type='hidden' value='0' name='LMI_SIM_MODE'><input type='submit' value='"+_('Go to payment').decode()+"'></form>")
return form