detail.html 495 Bytes
{% extends 'base.html' %}

{% block content %}
    <h1>Article</h1>

    <h2>{{ article.title }}</h2>
    <p>{{ article.text }}</p>
    <p>By: {{ article.author }}</p>

    <a href="{% url 'articles_update' id=article.id %}" class="btn btn-primary">
        Update
    </a>

    <form action="{% url 'articles_delete' id=article.id %}" method="post" onsubmit="return confirm('Delete?')">
        {% csrf_token %}
        <button class="btn btn-danger">Delete</button>
    </form>

{% endblock %}