In certain cases, I want to have the login page return a user to the
page he/she was on when they clicked login. My thought is to use
{{ request.META.HTTP_REFERER }}, but I'm not sure where to fit it. I'm
using the django-registration package, so I have a urls.py like so:

from django.contrib.auth import views as auth_views
url(r'^login/$',
                           auth_views.login,
                           {'template_name': 'registration/
login.html'},
                           name='auth_login'),

And login.html template containing:

<form method="post" action="{% if next %}?next={{ next }}{% endif %}">

Does anyone have a working solution for setting next to the referring
page?
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to