Django报错:Reverse for 'detail' with keyword arguments '{'pk': '2'}' not found. 1 pattern(s) tried: ['$post/(?P<pk>[0-9]+)/$']

django 报错Reverse for 'detail' with keyword arguments '{'pk': '2'}' not found. 1 pattern(s) tried: ['$post/(?P<pk>[0-9]+)/$']

 

 

解决方案:

url(r'^$', include(("blog.urls",'blog')))改为url(r'', include(("blog.urls",'blog')))

django 报错Reverse for 'detail' with keyword arguments '{'pk': '2'}' not found. 1 pattern(s) tried: ['$post/(?P<pk>[0-9]+)/$']

 

 改为

django 报错Reverse for 'detail' with keyword arguments '{'pk': '2'}' not found. 1 pattern(s) tried: ['$post/(?P<pk>[0-9]+)/$']

相关文章:

  • 2021-05-17
  • 2021-09-17
  • 2021-11-07
  • 2021-09-04
  • 2021-04-08
  • 2021-10-03
  • 2021-06-28
猜你喜欢
  • 2022-12-23
  • 2021-08-04
  • 2022-12-23
  • 2021-12-21
  • 2022-01-02
  • 2022-01-13
  • 2021-04-11
相关资源
相似解决方案