From: Brett Parker Date: Mon, 11 Feb 2008 10:44:22 +0000 (+0000) Subject: Small fixes for the blog handling code X-Git-Url: https://git.sommitrealweird.co.uk/sommitrealweird.git/commitdiff_plain/704ace48dfd3f1dd64271d1916c7defb4806e86c Small fixes for the blog handling code --- diff --git a/sommitrealweird/blog/templates/blog/blog_index.html b/sommitrealweird/blog/templates/blog/blog_index.html index 8e94748..e43cc64 100644 --- a/sommitrealweird/blog/templates/blog/blog_index.html +++ b/sommitrealweird/blog/templates/blog/blog_index.html @@ -39,6 +39,7 @@ {% if has_next %} | Next {% endif %} +

{% endif %} {% else %}

We have no blog entries - that sucks!

diff --git a/sommitrealweird/blog/templates/blog/single_entry_rst.html b/sommitrealweird/blog/templates/blog/single_entry_rst.html index 5681e14..e2bd8c7 100644 --- a/sommitrealweird/blog/templates/blog/single_entry_rst.html +++ b/sommitrealweird/blog/templates/blog/single_entry_rst.html @@ -3,6 +3,23 @@ {% load markup %} {% block content %} -

{{ title }}

-{{ content|restructuredtext }} +

{{ entry.title }}

+{{ entry.content|restructuredtext }} +

Posted: {{ entry.publish_date|date:"Y-m-d H:i" }} + {% if entry.sections.count %} + in + {% for section in entry.sections.all %} + {% if forloop.first %} + {{ section.title }}{% if not forloop.last %}, {% endif %} + {% else %} + {% if forloop.last %} + and {{ section.title }} + {% else %} + {{ section.title }} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + permalink +

{% endblock %} diff --git a/sommitrealweird/blog/views.py b/sommitrealweird/blog/views.py index a801cd4..d5da81b 100644 --- a/sommitrealweird/blog/views.py +++ b/sommitrealweird/blog/views.py @@ -46,8 +46,7 @@ def blog_view(request, year=None, month=None, day=None, hour=None, minutes=None, t = loader.get_template(template_name) c = RequestContext(request, { - "content": blog_entry.content, - "title": blog_entry.title, + "entry": blog_entry, "publish_date": blog_entry.publish_date } )