python - Unknown specifier in URL when using Django-Tagging -
hi getting following error;
error @ / unknown specifier: ?p[
this urls file looks like;
urlpatterns = patterns('mainpage.views', (r'^$', 'index'), (r'^post/(?p<id>\d+)/$', 'post'), (r'^projects/$', 'projects'), (r'^about/$', 'about'), (r'^tags/$', 'tags'), (r'^tag/(?p[-_a-za-z0-9]+)/$', 'with_tag'), (r'^tag/(?p[-_a-za-z0-9]+)/page/(?pd+)/$', 'with_tag'), (r'^comments/$', include('django.contrib.comments.urls'))
the 2 urls view name of with_tag offending urls. following this tutorial;
to tagging working on site. using django-tagging 1.3.1 , python 2.7.
can tell me doing wrong urls.py file please? copying tutorial book there must different in set compared set used in tutorial?
this not related django-tagging, it's regex syntax error. ?p
indicates named group, , requires name after it: ?p<foo>
. so, either add names groups, or make them numbered (i.e. remove ?p
part).
Comments
Post a Comment