You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
2.4 KiB
50 lines
2.4 KiB
{% extends 'base.html' %}
|
|
{% load myfilter %} <!--加载文件夹-->
|
|
|
|
{% block title %}
|
|
详情页面
|
|
{% endblock %}
|
|
|
|
{% block left %}
|
|
|
|
<div id="main">
|
|
<article class="article article-type-post">
|
|
<div class="article-meta">
|
|
<a class="article-date">
|
|
<time>{{ post.created|date:'Y-m-d H:i:s' }}</time>
|
|
</a>
|
|
<div class="article-category">
|
|
<a class="article-category-link" href="#" target="_blank">{{ post.category.cname }}</a>
|
|
</div>
|
|
</div>
|
|
<div class="article-inner">
|
|
<header class="article-header">
|
|
<h1 itemprop="name">
|
|
<a class="article-title">{{ post.title }}</a>
|
|
</h1>
|
|
</header>
|
|
<div class="article-entry" itemprop="articleBody">
|
|
<h2>前言</h2>
|
|
{{ post.desc }}
|
|
<hr>
|
|
{{ post.content|md|safe }} <!--safe是自动解析-->
|
|
</div>
|
|
</div>
|
|
</article> <!--分享操作,借用百度的接口-->
|
|
<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone"></a><a href="#" class="bds_tsina" data-cmd="tsina"></a><a href="#" class="bds_tqq" data-cmd="tqq"></a><a href="#" class="bds_renren" data-cmd="renren"></a><a href="#" class="bds_weixin" data-cmd="weixin"></a></div>
|
|
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdPic":"","bdStyle":"0","bdSize":"16"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到:","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
|
|
</div>
|
|
<!--评论-->
|
|
<h3>Comments</h3>
|
|
{% for comment in post.comments.all %}
|
|
<p>{{ comment.author.username }} says: {{ comment.content }}</p>
|
|
{% endfor %}
|
|
<h3>Add a comment</h3>
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
{{ form.as_p }}
|
|
<button type="submit">Submit Comment</button>
|
|
</form>
|
|
|
|
|
|
{% endblock %} |