I am trying to implement a redirection script. The format of the url would be
http://localhost:8000/key/url=http://google.com
From the above, I want http://google.com
When some user visits the above url, it hits the urlpatters defined in the urls.py
url(r'^key/url=(.*)', 'homepage.views.redirectquerystring', name="Redirect"),
I am trying to get the url http://google.com using the below view
def redirectquerystring(request):
para = request.GET.get('url','')
But when I do this, I am getting the following error:
TypeError at /key/url=http://google.com
redirectquerystring() takes exactly 1 argument (2 given)
Am I doing some mistake here.
Thanks.