帮忙看看问题出在哪,我找了大半天~~url 代码from django.conf.urls import urlfrom.import viewsurlpatterns = [ url(r'^index/$', views.index), url(r'^article/(?P<article_id>[0-9]+)$', views.article_page, name='article_page'), url(r'^edit/$', views.edit_page, name='edit_page'), url(r'^edit/action$', views.edit_action, name='edit_action')网页提示错误:Error during template renderingIn template D:\we\myblog\blog\templates\blog\index.html, error at line 9u'blog' is not a registered namespace<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <h1> <a href="{% url 'blog:edit.page' %}">新文章</a> </h1> {% for article in articles %} <a href="">{{ article.title }}</a> <br/> {% endfor %} </body> </html> </html>
添加回答
举报
0/150
提交
取消