Reverse for 'edit_page' with arguments '('',)' and keyword arguments '{}' not found. 1 pattern(s) tried: [u'blog/edit/(?P<article_id>[0-9]+)$']
article_page.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Article Page</title> </head> <body> <h1>{{ article2.title }}</h1> <br/> <h3>{{ article2.content }}</h3> <br/><br/> <a href="{% url 'blog:edit_page' article.id %}">修改文章</a> </body> </html>
urls.py
from . import views from django.conf.urls import url urlpatterns = [ url(r'^index/', views.index), url(r'^article/(?P<article_id>[0-9]+)$', views.article_page,name='article_page'), url(r'^edit/(?P<article_id>[0-9]+)$', views.edit_page,name='edit_page'), url(r'^edit/action$', views.edit_action,name='edit_action'), ]
只要加了修改文章的url就提示这个问题,我看了说是正则表示式问题?关键我直接复制的,看不出问题在哪里啊