Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第二次印刷版 P165 [问题纠正] #50

Open
SniperM99 opened this issue Feb 24, 2020 · 0 comments
Open

第二次印刷版 P165 [问题纠正] #50

SniperM99 opened this issue Feb 24, 2020 · 0 comments

Comments

@SniperM99
Copy link

urlpatterns = [
    #配置后台页面
    url(r'^super_admin/', super_site.urls, name='super-site'),
    url(r'^custom_admin/', custom_site.urls, name='custom-site'),
    url(r'^admin/', admin.site.urls, name='admin'),

    #配置用户页面
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^category/(?P<category_id>\d+)/$', CategoryView.as_view(),
        name='category-list'),
    url(r'^tag/(?P<tag_id>\d+)/$', TagView.as_view(),
        name='tag-list'),
    url(r'^post/(?P<post_id>\d+).html$', PostDetailView.as_view(),
        name='post-detail'),
    url(r'^links/$', links, name='links')
]

其中的 url(r'^post/(?P<post_id>\d+).html$', PostDetailView.as_view(), name='post-detail'),html$后面添加/,最后改为html/$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant