Re: URL matching problem

2015-03-24 Thread Ma Yuping
Actually: In my project url, I have: urlpatterns = patterns('', url(r'^blog/', include('blog.urls', namespace="blog")), ) In the App, I have: urlpatterns = patterns('', #url(r'/$', views.index, name='index'), url(r'(?P\d+)/$', views.index, name='index'), url(r'(?P\d+)/article/(?P\d+)/$',

Re: URL matching problem

2015-03-24 Thread Ma Yuping
It solved. It should be exact: I should put '^' before the APP's URL. url(r'^(?P\d+)/$', views.index, name='index'), url(r'^(?P\d+)/article/(?P\d+)/$', views.article, name='article'), Thanks 在 2015年3月24日星期二 UTC+8上午10:45:33,Curtis Maloney写道: > > Firstly, this is really a question for

Re: URL matching problem

2015-03-23 Thread Curtis Maloney
Firstly, this is really a question for django-users ... this mailing list is for discussion of the development _of_ Django, not _with_ Django. On 24 March 2015 at 13:16, Ma Yuping wrote: > django V1.6.8 > > Let URL be: > > url(r'^blog/(?P\d+)/$', views.index,

URL matching problem

2015-03-23 Thread Ma Yuping
django V1.6.8 Let URL be: url(r'^blog/(?P\d+)/$', views.index, name='index'), url(r'^blog/(?P\d+)/article/(?P\d+)/view/$', views.article, name='article'), Input following urls to the the browser: blog/1/ blog/1/1/ blog/1/article/1/ blog/1/1/1/1/article/1/1/1/1/ blog/bb/1/1/1/ ... They