我的網址是這樣的...卡住,爲什麼Django沒有找到這個網址?
/eng/blog/site-news/
,來了看起來像這樣的錯誤...
^admin/
^(?P<page_lang>\w+)/blog/
^(?P<page_lang>\w+)/blog/
^(?P<page_lang>\w+)/blog/
^$
^(?P<category>\w+)/$
^(?P<category>\w+)/post/(?P<post_title>\w+)/$
我這樣做過,從來沒有碰到了這個問題,它有要的東西太小,我沒有看到
urls.py#1
url(r'^admin/', include(admin.site.urls)),
url(r'^(?P<page_lang>\w+)/blog/', include('blog.urls')),
url(r'^blog/', include('blog.urls')),
url(r'^comments/', include('django_comments.urls')),
url(r'^', include('main.urls')),
urls.py#2
url(r'^$', 'blog.views.main_page'),
url(r'^(?P<category>\w+)/$', 'blog.views.category_page'),
url(r'^(?P<category>\w+)/post/(?P<post_title>\w+)/$', 'blog.views.post_page'),
你有多個'urls.py'文件?你介意發佈'urls.py'文件嗎? – Noah
發佈了,謝謝... – deltaskelta