Monday, 26 August 2013

why is this django regex wont work?

why is this django regex wont work?

I have this regex in my urls.py for my blog app and I'd like to know why
is it not working.
url(r'^/tag/(?P<tag_text>\w+)/$', views.tag, name='tag'),
and I have defined this in the blog's views.py
def tag(request,tag_text):
and this in the application's urls.py
url(r'^blog/', include('blog.urls')),
I have tried localhost/blog/tag/sport but I still get: The current URL,
blog/tag/sport, didn't match any of these. Am I doing something wrong?

No comments:

Post a Comment