{% extends 'base.html' %} {% block title %}Liste des articles{% endblock %} {% block content %}
Retour à la liste des articles {% if user.is_authenticated and user == article.author %} Modifier cet article {% endif %}

{{ article.title }} ({{views}} vues)

- écrit par {{ article.author }}

{{ article.content }}


Commentaires

{% for comment in article.comment_set.all %}

{{ comment.content }}

{% endfor %} {% if user.is_authenticated %}
{% csrf_token %} {{ comment_form.as_p }}
{% else %}

Vous devez être connecté pour ajouter un commentaire

{% endif %}
{% for comment in comments %}

{{ comment.author }} (publié le {{comment.created_at|date:"d/m/Y à H:i"}})

{{ comment.content }}

{% if comment.user_like == True %} {% else %} {% endif %} {% if comment.user_like == False %} {{ comment.dislikes }} {% else %} {{ comment.dislikes }} {% endif %}

{% endfor %} {% endblock %}