summaryrefslogtreecommitdiff
path: root/project/templates/blog/post_list.html
diff options
context:
space:
mode:
Diffstat (limited to 'project/templates/blog/post_list.html')
-rw-r--r--project/templates/blog/post_list.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/project/templates/blog/post_list.html b/project/templates/blog/post_list.html
new file mode 100644
index 0000000..b536f47
--- /dev/null
+++ b/project/templates/blog/post_list.html
@@ -0,0 +1,35 @@
+{% extends "blog/base_blog.html" %}
+
+
+{% block title %}{% endblock %}
+{% block body_class %}{{ block.super }} post_list{% endblock %}
+
+
+{% block content_title %}
+ <h2>Post archive</h2>
+{% endblock %}
+
+
+{% block content %}
+ <div class="post_list">
+ {% for post in object_list %}
+ <div>
+ <h3 class="title"><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h3>
+ <p class="date">{{ post.publish|date:"Y F d" }}</p>
+ <p class="tease">{{ post.tease }}</p>
+ </div>
+ {% endfor %}
+ </div>
+
+ {% if is_paginated %}
+ <p class="pagination">
+ {% if has_next %}
+ <a class="older" href="?page={{ next }}">Older</a>
+ {% endif %}
+ {% if has_next and has_previous %} | {% endif %}
+ {% if has_previous %}
+ <a class="newer" href="?page={{ previous }}">Newer</a>
+ {% endif %}
+ </p>
+ {% endif %}
+{% endblock %}