On Fri, Dec 11, 2009 at 6:25 PM, Andy <asdjohn...@gmail.com> wrote:
> Tom - DR's method is simple and effective, but I'm guessing you say
> it's the worst way because it creates an unnecessary database
> request.  Is this a correct assumption?  If not, please explain.
>
>

There are at least 2 things wrong with it IMO:

1) Not using django's URL conf to generate the redirect URL. This
means that URL is hardcoded and duplicated.
2) Storing state unnecessarily in the session, ie, storing the current
order in the session. Once the order is created, we have a single
unambiguous URL to the order, that will not change. If you store it in
the session, you can only refer to that order by having the 'right
session'.

Cheers

Tom

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to