Question

I want a web page (with the url page3) to be displayed differently depending on whether a user on my website is redirected to it from the pages with urls page1 or page2.

How can I access the full url (not just the query parametres in it) from which the user was redirected in the get method in the view associated with the url page3 ?

Was it helpful?

Solution

After reading the docs more thoroughly (thanks for the tip Brandon!), I found request.META['HTTP_REFERER'] did the trick.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top