-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It is possible to skip steps by manipulating the URL #84
Comments
I would say that we need order_required decorator. |
Hmm sounds like a good idea! |
we should put the decorator on the payment views as well |
@stephenmuss how exactly should the callable be used? If i do this
I get
|
@alesdotio it should be a url path. You could pass in a raw string or better to use e.g.
Note: Not tested. Just off the top of my head. Edit: OK. So I didn't think about this at the time, but of course using reverse here won't work. Which means the decorator in its current state will only take a url path as a string. Some refactoring may be warranted. A simple lazy reverse could do the trick. I'm happy to take a look if you'd like. What's your preference in terms of the optional argument supplied? Leave it as a url or would you prefer to pass in a callable instead? |
I've just made a commit to my fork which approaches it slightly different. So now we could use Perhaps that would be more flexible? Happy to open a pull request. I'd still need to rework it so that args and kwargs etc can be passed in the same as in |
@stephenmuss
|
@alesdotio However, I agree that being able to pass in a callable or just a string might be a nicer way to do it. Making the developer explicitly pass in I'll make some changes and open another pull request. Cheers. |
awesome, thank you |
When seeing the cart, you can just enter /ship/flat/ as a URL and click at the submit button. This will obviously result in the following error:
ValueError at /shop/ship/flat/process/
Cannot assign None: "ExtraOrderPriceField.order" does not allow null values.
How do we handle this? Does the shop need to be aware of the current step and redirect to that step in case someone manipulates the URL?
The text was updated successfully, but these errors were encountered: