> 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'.
This seems like you are describing the login_required decorator[1]. It automatically saves the current url as a query parameter (next) and redirects to that url once login is complete. If you don't like decorators you could still use the login view[2] that has the redirect logic you are after. [1] http://docs.djangoproject.com/en/dev/topics/auth/#the-login-required-decorator [2] http://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.views.login Hope that helps, Alex --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---