In a urls.py file:
url(r'^api/user_info/(?P<username>[a-zA-Z\d]+)\&', 'corresponding.view')
url(r'^api/user_info/(?P<username>[a-zA-Z\d]+)', 'corresponding.view')
There will always be HTTP Get arguments to /api/user_info/username
.
The problem is that in the corresponding.view
function, username
will evaluate to something like "myusername?clientversion=2.0", instead of it evaluating to "myusername" and request.GET['clientversion'] = "2.0"
.
The first url
call is to try to catch the ampersand in there, but it doesn't help.
Thanks in advance.