I want to redirect the following uri to a view;
localhost:8000/?tag=Python
to
def index_tag_query(request, tag=None):
in my conf url, I tried the following regex patterns, but no one seems to capture the request, although the regex looks good;
url(r'^\?tag=(?P<tag>\w+)/$', 'links.views.index_tag_query'),
url(r'^\/?\?tag=(?P<tag>\w+)/$', 'links.views.index_tag_query'),
url(r'^\/?\?tag=(?P<tag>.*)/$', 'links.views.index_tag_query'),
What gives?
Kevin source share