Ronny Haryanto wrote:
> On Sun, May 11, 2008 at 11:55 AM, M.Ganesh <[EMAIL PROTECTED]> wrote:
>   
>> I am displaying a list of records in a page. I have a link in that page
>> which will take me to a form for adding one more record. How do I come
>> back to the previous page after adding a record?
>>     
>
> If the "previous page" is always the same, then you could return a
> HttpResponseRedirect to that view in your view method that handles the
> adding of one record.
>
>   
>> I remember seeing somewhere a trick involving something like <a
>> href=/list/add/?next=request.get_full_path>Add</a>......
>>     
>
> Alternatively, you could probably record the user's trail or view
> history in the database, then show it somewhere in the page, so the
> user can decide themselves which page they want to go back to.
>
> Ronny
>
>   
Thanks Ronny for your response, however this doesn't answer my 
requirement. Probably I've to state my requirement more clearly.  I have 
various pages for general viewing where authentication is not required. 
But if a user decides to add a record, he has to first login. I take him 
to a login page for that. After he logs in I want to bring him back to 
the same page. Note that a user can come to the login page from any of 
the different pages. Hence the 'previous page' is not always the same.

Thanks in advance for any pointers

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 [email protected]
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