|
1 {% extends "blog/base_blog.html" %} |
|
2 |
|
3 |
|
4 {% block title %}{{ object.title }}{% endblock %} |
|
5 {% block body_class %}{{ block.super }} post_detail{% endblock %} |
|
6 {% block body_id %}post_{{ object.id }}{% endblock %} |
|
7 |
|
8 |
|
9 {% block content_title %} |
|
10 <h2>{{ object.title }}</h2> |
|
11 <p class="other_posts"> |
|
12 {% if object.get_previous_by_publish %} |
|
13 <a class="previous" href="{{ object.get_previous_post.get_absolute_url }}">« {{ object.get_previous_post }}</a> |
|
14 {% endif %} |
|
15 {% if object.get_next_by_publish %} |
|
16 | <a class="next" href="{{ object.get_next_post.get_absolute_url }}">{{ object.get_next_post }} »</a> |
|
17 {% endif %} |
|
18 </p> |
|
19 {% endblock %} |
|
20 |
|
21 |
|
22 {% block content %} |
|
23 {% load blog markup comments tagging_tags %} |
|
24 |
|
25 <h1>{{ object.title }}</h1> |
|
26 <p class="date">{{ object.publish|date:"j F Y" }}</p> |
|
27 |
|
28 <div class="body"> |
|
29 {{ object.body|markdown:"safe" }} |
|
30 </div> |
|
31 |
|
32 {% tags_for_object object as tag_list %} |
|
33 {% if tag_list %} |
|
34 <p class="inline_tag_list"><strong>Related tags:</strong> |
|
35 {% for tag in tag_list %} |
|
36 {{ tag }}{% if not forloop.last %}, {% endif %} |
|
37 {% endfor %} |
|
38 </p> |
|
39 {% endif %} |
|
40 |
|
41 {% get_comment_list for object as comment_list %} |
|
42 {% if comment_list %} |
|
43 <div id="comments"> |
|
44 <a name="comments"></a> |
|
45 <h3 class="comments_title">Comments</h3> |
|
46 {% for comment in comment_list %} |
|
47 {% if comment.is_public %} |
|
48 <div class="comment"> |
|
49 <h5 class="name"> |
|
50 <a name="c{{ comment.id }}" href="{{ comment.get_absolute_url }}" title="Permalink to {{ comment.person_name }}'s comment" class="count">{{ forloop.counter }}</a> |
|
51 {% if comment.user_url %}<a href="{{ comment.user_url }}">{{ comment.user_name }}</a>{% else %}{{ comment.user_name }}{% endif %} says... |
|
52 </h5> |
|
53 {{ comment.comment|urlizetrunc:"60"|markdown:"safe" }} |
|
54 <p class="date">Posted at {{ comment.submit_date|date:"P" }} on {{ comment.submit_date|date:"F j, Y" }}</p> |
|
55 </div> |
|
56 {% endif %} |
|
57 {% endfor %} |
|
58 </div> |
|
59 {% endif %} |
|
60 {% if user.is_authenticated %} |
|
61 {% if object.allow_comments %} |
|
62 <div id="comment_form"> |
|
63 {% render_comment_form for object %} |
|
64 </div> |
|
65 {% else %} |
|
66 <div id="comment_form"> |
|
67 <h3>Comments are closed.</h3> |
|
68 <p>Comments have been close for this post.</p> |
|
69 </div> |
|
70 {% endif %} |
|
71 {% else %} |
|
72 <div id="comment_form"> |
|
73 <h3>Comments are closed.</h3> |
|
74 <p>Please login in to comment.</p> |
|
75 </div> |
|
76 {% endif %} |
|
77 {% endblock %} |