sblog icon indicating copy to clipboard operation
sblog copied to clipboard

django1.5.1版本下报错在blog-list.html

Open ranlix opened this issue 9 years ago • 2 comments

Reverse for 'delblog' with arguments '(4,)' and keyword arguments '{}' not found.

22              <div class="span2 offset7">
23                  <a href="{% url "delblog" blog.id %}" title="delete"><i class="icon-trash"></i></a>
24                  <a href="{% url "updateblog" blog.id %}" title="edit"><i class="icon-edit"></i></a>
25                  {% get_comment_count for blog as comment_count %}
26                  <a href="{% url "detailblog" blog.id %}#cmt" title="comment"><i class=" icon-comment"></i>{{ comment_count }}</a>
27              </div>

而删除line23 和line 25后,页面可以显示而不报错:

22           <div class="span2 offset7">
23
24               <a href="{% url "updateblog" blog.id %}" title="edit"><i class="icon-edit"></i></a>
25
26                <a href="{% url "detailblog" blog.id %}#cmt" title="comment"><i class=" icon-comment"></i>{{ comment_count }}</a>
 27          </div>

很奇怪,这个问题会是跟django的版本有关么

ranlix avatar May 08 '15 17:05 ranlix

嗯 有可能 是版本的问题 这个 应该是url 声成的时候的报错

gusibi avatar May 12 '15 13:05 gusibi

嗯,之前搜索的时候看见的网络上有类似的问题,貌似是把紧跟在url后面的关键字用引号括起来就解决的,但是我实际上操作的结果还是有问题,还是感觉我应该重头开始从简单的开始写起才好查是什么问题

ranlix avatar May 12 '15 14:05 ranlix