Answer the question
In order to leave comments, you need to log in
Why doesn't url(django) work?
url in config
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^', include('blog.urls')),
]
urlpatterns = [
url(r'^post/(?P<id>\d+)/$', views.valpost, name='valpost'),
url(r'^post/', views.detail, name='detail'),
url(r'^post/(?P<id>\d+)/edit/$', views.post_update, name='update'),
]
Answer the question
In order to leave comments, you need to log in
You just misspelled the regex
# url(r'^post/', views.detail, name='detail'),
url(r'^post/$', views.detail, name='detail'),
url(r'^post/admin/', include('post_admin.urls')),
url(r'^post/', include('post.urls')),
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question