<h2 class="post-title">{{ post.title }}</h2>
<p class="post-meta">
Time: <a class="post-author" href="#">{{ post.date_time|date:"Y /m /d"}}</a> <a class="post-category post-category-js" href="#">{{ post.category }}</a>
</p>
</header>
my_blog_tutorial
my_blog_tutorial copied to clipboard
学到markdown时有错误 custom markdown is not a valid tag library求指导
Error during template rendering
In template /python_workspace/my_blog/templates/post.html, error at line 3
'custom_markdown' is not a valid tag library: Template library custom_markdown not found, tried django.templatetags.custom_markdown,django_admin_bootstrapped.templatetags.custom_markdown,django.contrib.admin.templatetags.custom_markdown,django.contrib.staticfiles.templatetags.custom_markdown
post.html
{% extends "base.html" %} {% load custom_markdown %} {% block content %}
我也是在博客学到markdown时遇到错误了,不过看了你的代码段把我的问题解决了,以下为错误代码段 href="{% url "search_tag" tag=post.category %}” 应该是 href="#”
拨错信息为: Error during template rendering
In template /root/python/ENV3.4/my_blog/templates/post.html, error at line 12 Reverse for 'search_tag' with arguments '()' and keyword arguments '{'tag': '1111'}' not found. 0 pattern(s) tried: []
post.html
<p class="post-meta"> Time: <a class="post-author" href="#">{{ post.date_time|date:"Y /m /d"}}</a> <a class="post-category post-category-js" href="{% url "search_tag" tag=post.category %}">{{ post.category }}</a> </p>