{% extends "base.html" %} {% block title %}update post{% endblock %} {% block content %} {% if user.is_authenticated %} {% if user.id == post.author_profile.user.id %}

Edit Post

{% csrf_token %} {{ form.media }} {{ form.as_p }}
{% else %}

You are not authorized to edit/delete this post!

{% endif %} {% else %}

You are not authorized to edit/delete this post!

{% endif %} {% endblock %}