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

{% block content %}

  <p><a href="{% url 'blogs:blog' blog.id %}">{{ blog.title }}</a></p>

  <p>Create a new post:</p>
  <form action="{% url 'blogs:new_post' blog.id %}" method='post'>
    {% csrf_token %}
    {{ form.as_div }}
    <button name='submit'>Create post</button>
  </form>

{% endblock content %}