{% extends "blog/base.html" %} 

{% block title %}Mój blog{% endblock %}

{% block content %}
  <h1>Mój blog</h1>
  {% for post in posts %}
    <h2>
      <a href="{% url 'blog:post_detail' post.id %}">
        {{ post.title }}
      </a>
    </h2>
    <p class="date">
      Opublikowany {{ post.publish }} przez {{ post.author }}
    </p>
    {{ post.body|truncatewords:30|linebreaks }}
  {% endfor %}
{% endblock %}
