{% extends 'main/layout.html' %} {% block title %}{{ post.title}} — {{ blog_user.blog_title }}{% endblock %} {% block meta_description %}{{ post.body_as_text|truncatewords:16 }}{% endblock %} {% block content %}
{% if blog_user.blog_title %} {{ blog_user.blog_title }} {% endif %}

{{ post.title }}

{{ post.body_as_html|safe }}
{% include 'partials/webring.html' %} {% if blog_user.comments_on %}
{% if request.user.is_authenticated and request.subdomain == request.user.username %}
Post comment as blog author
{{ form.non_field_errors }}

{% if form.body.errors %} {% for error in form.body.errors %} {{ error|escape }}
{% endfor %} {% endif %}

{% csrf_token %}
{% else %}
Thoughts? Leave a comment
{{ form.non_field_errors }}

{% if form.name.errors %} {% for error in form.name.errors %} {{ error|escape }}
{% endfor %} {% endif %}

{% if form.email.errors %} {% for error in form.email.errors %} {{ error|escape }}
{% endfor %} {% endif %}

{% if form.body.errors %} {% for error in form.body.errors %} {{ error|escape }}
{% endfor %} {% endif %}

{% csrf_token %}
{% endif %} {% if comments_pending and request.user.is_authenticated and request.subdomain == request.user.username %}
Comments pending ({{ comments_pending|length }})
{% endif %} {% if comments %}
Comments
    {% for comment in comments %}
  1. {% if comment.is_author %} {{ comment.name }}{{ comment.created_at|date:'M j, Y' }}: {% else %} {{ comment.name|default_if_none:"Anonymous" }} {% if request.user.is_authenticated and request.subdomain == request.user.username and comment.email %} ({{ comment.email }}) {% endif %}— {{ comment.created_at|date:'M j, Y' }}: {% endif %} {% if request.user.is_authenticated and request.subdomain == request.user.username %} (delete) {% endif %}
    {{ comment.body_as_html|safe }}
  2. {% endfor %}
{% endif %}
{% endif %} {% include 'partials/footer_blog.html' %} {% endblock %} {% block scripts %} {% if not blog_user.comments_on %} {% endif %} {% endblock %}