If you have `django.core.context_processors.request` context processor enabled and you use RequestContext so the `{{request.path}}` will return current path. Or you can simple pass `request.path` variable to the template context manually.
On May 16, 8:58 pm, "M.Ganesh" <[EMAIL PROTECTED]> wrote: > Hi, > > I don't know how to clearly explain what I want to know. Let me try once > again... > > I have a small controlpanel page which I include in all my other pages. > This control panel page has got a link to 'login' page. Users are > allowed to view the pages without login, but they have to login if they > want to make any changes to the data. So if somebody realises he wants > to change the data he is currently viewing, he will click the login > link. Now I want him to be brought back to the page he was viewing > before logging in. The trouble is because the 'login' link is in a > template which will get included to a arbitrary page. In other words : > > #my controlpane.html > > {% if user.is_anonymous %} > <p align="center">Welcome <br> > Please login<br><br> > <a href='/login/?next={{ WHAT-DO-I-PUT-HERE }}'>login</a></p> > {% else %} > blah blah > {% endif %} > > Regards Ganesh --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---