I have this long url and I want to match the string after
?
Urlpatterns = [
# bunch of awesome urls
url(r'^new_timer/(?P<params>[^/]+)/$',NewTimerView.as_view(),
name='new_timer'),
]
What am I doing wrong?
Two mistakes in your regex: ^new_timer/(?P<params>[^/]+)/$
You are not matching ?
at all. Also you will have to escape
it.
You have /
in end. Whereas there is no /
in URL at end.
Correct regex should be: ^new_timer/\?(?P<params>[^/]+)$