Reputation: 1861
I am on url : /main/a=11&b=22
I want to store this in my session to come back to this page later
How can fetch this url with all the parmeters like this.
url = fetch_function(currnet_url)
print url
/main/a=11&b=22
request.session['url'] = url
Upvotes: 1
Views: 376
Reputation: 2275
Use request.get_full_path()
method. Read more here: https://docs.djangoproject.com/en/1.6/ref/request-response/#django.http.HttpRequest.get_full_path
Upvotes: 3