Hi,
I'm trying to implement paypal payments which come with cartridge. At first
I've tried to do this:
SHOP_CHECKOUT_FORM_CLASS = 'my_theme.forms.MyOrderForm'
But of course I got a message that it's deprecated and I need to pass it to url
so I tried adding this to my url.py:
url("^shop/checkout/$","cartridge.shop.views.checkout_steps", {"form_class":
MyOrderForm},name="shop_checkout"),
and after some search in mailing list also this:
url("^shop/checkout/$","cartridge.shop.views.checkout_steps",
name="shop_checkout", kwargs=dict(form_class=MyOrderForm)),
for my form I used example from cartridge.shop.payment.paypal:
from django import forms
from cartridge.shop.forms import OrderForm
from cartridge.shop.payment.paypal import COUNTRIES
class MyOrderForm(OrderForm):
def __init__(self, *args, **kwargs):
super(OrderForm, self).__init__(*args, **kwargs)
billing_country = forms.Select(choices=COUNTRIES)
shipping_country = forms.Select(choices=COUNTRIES)
self.fields['billing_detail_country'].widget = billing_country
self.fields['shipping_detail_country'].widget = shipping_country
But I keep getting this error no mater what I try:
'int' object has no attribute 'get'
This happens during rendering of
mezzanine/core/templates/includes/form_fields.html
Any ideas? Any help would be appreciated.
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.