On 2/09/2015 7:19 AM, James Lewis wrote:
I have tried this and it is still not working, I have tried all the different urls on this group and I am still getting the same errors. What else do you have to change to stop this error appearing; is there not any changes I need to make in forms.py, settings or anything else? Sorry but I am really struggling on this for some reason


Have you removed SHOP_CHECKOUT_FORM_CLASS from your settings.py? The urls.py changes *replace* the need for this deprecated setting.

eg. instead of
SHOP_CHECKOUT_FORM_CLASS = "myapp.forms.MyOrderForm"
in settings.py,  you do:

|from myapp.forms import MyOrderForm # ... urlpatterns += patterns('', # Use your special OrderForm class url("^shop/checkout/$", "cartridge.shop.views.checkout_steps", name="shop_checkout", kwargs=dict(form_class=MyOrderForm)), # Cartridge URLs. ("^shop/", include("cartridge.shop.urls")), # ... )|

in urls.py

HTH. HAND.

Seeya. Danny.

Thanks

James
On Friday, July 11, 2014 at 6:07:43 PM UTC+1, Tristan Barry wrote:

    Good afternoon! I am working on a project where we would like to
    use Cartridge for an online store. Out of the box it looks great;
    but I'd like to modify the checkout form. Reading through the
    documentation it sounded like I could sub-class the OrderForm
    class in 'cartridge.shops.forms'. When going through these steps I
    saw this message:

    "The SHOP_CHECKOUT_FORM_CLASS setting is deprecated - please
    define your own urlpattern for the checkout_steps view, passing in
    your own form_class argument."

    But I'm running into problems right off the start. Does this mean
    I can just write my own URL pattern for *only* the checkout form?
    Something like this?

    url("^shop/checkout/$", "myproject.views.checkout_steps", name =
    "checkout_steps")
    ?

    Or do I need to remove the cartridge urls pattern:
      url(r"^shop/", include("cartridge.shop.urls")),
    and replace it with a modified version of 'cartridge.shop.urls'?
    This doesn't seem very DRY?

    Can anyone offer any hints on how to get started?  Should the
    OrderForm class still be sub-classed to assist with making this
    all 'work'? Any help??


--
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] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.


--
*Danny Sag*
Chairperson
Round World Events SA, Inc
City of Small Gods Terry Pratchett Fan Club - http://cityofsmallgods.org.au

*Nullus Anxietas VI - The Australian Discworld Convention* - http://ausdwcon.org
"The Discworld Grand Tour" - Adelaide SA, August 4-6, 2017

--
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.

Reply via email to