开发者

Django Date based URL

Maybe im blind to my code or something..But this does not work right!

main urls:

urlpatte开发者_高级运维rns = patterns('',
(r'^', include('content_manager.urls')),
(r'^admin/filebrowser/', include('filebrowser.urls')),
(r'^admin/', include(admin.site.urls)),
)

content_manager app url:

urlpatterns = patterns('content_manager.views',
(r'^blog/archive/(?P<year>d{4})/(?P<month>[a-z]{3})/$', 'show_blog_archive'),
(r'^blog/(?P<pk>\d+)/', 'show_blog_post'),
(r'^(?P<url>[\w\-]+)/$', 'show_page'),
(r'^portfolio/', 'show_portfolio'),
(r'^$', 'index'),
)

When going to this url:

/blog/archive/2011/sep/

I get a 404 page

^ ^blog/archive/(?P<year>d{4})/(?P<month>[a-z]{3})/$
^ ^blog/(?P<pk>\d+)/
^ ^(?P<url>[\w\-]+)/$
^ ^portfolio/
^ ^$
^admin/filebrowser/
^admin/
^media/(?P<path>.*)$

What am I missing?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜