On Sep 24, 2009, at 9:53 AM, Brian McKeever wrote: > I imagine request.path would do what you want: > http://docs.djangoproject.com/en/dev/ref/request-response/#attributes
Perfect, thanks. This inspires me to ask if there are known-pattern ways of accomplishing the two things I need the URI for... 1. Consider the user requesting a page like '/orders/9123'. We detect that the user needs to be logged in to see a particular order, so we redirect to a login form, saving the '/orders/9123'. If the user logs in as the correct user, we then issue a redirect back to '/orders/9123'. 2. A single form might appear on multiple pages, and thus be processed in multiple views. Collecting the actual form-processing logic into a single function or method is no big deal, and if the form submission is successful, we redirect to the next page in the flow. However, if we have to redraw the page from which the form came, we need to know the right template (since it could be one of several), and we can determine that by looking at the URI. Are there more standard or more built-in ways of handling these? -- -- Christophe Pettus x...@thebuild.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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 -~----------~----~----~----~------~----~------~--~---