0
感謝您的幫助,不得不刪除這個原因,我不能透露。支付網關和Django/Python
感謝您的幫助,不得不刪除這個原因,我不能透露。支付網關和Django/Python
第一,而不是使用multiwordReplace,你爲什麼不渲染數據到模板
t = loader.get_template('myapp/index.html')
c = Context({'foo': 'bar'})
t.render(c)
你應該也可能定義在Django這些形式,forms.py:
class PayPalForm(forms.Form):
user = forms.HiddenField(required = True)
currencycode = forms.CharField(required = True)
cart_total = forms.CharField(required = True)
那麼你可以這樣做:
t = loader.get_template('myapp/paypalform.html')
if site.uses_paypal_condition:
f = PayPalForm()
else:
f = SomeOtherPaymentForm()
c = Context({'payform': 'f'})
t.render(c)