neck45
neck45

Reputation: 89

Accessing URL in 'get' method of view

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 ?

Upvotes: 2

Views: 154

Answers (1)

neck45
neck45

Reputation: 89

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

Upvotes: 1

Related Questions