{{ username }} Posts

{% if posts %}
{% for post in posts %}

{{ post.text }}

{% if post.media_file %}
{{ 'GIF' if post.media_file.endswith('.gif') else 'Image' }}
{% endif %} {% if post.username == current_user.username %}
{% endif %}

Comments

{% for comment in post.comments %}
Avatar of {{ comment.username }}

{{ comment.username }} ({{ comment.comment_date.strftime('%Y-%m-%d %H:%M') }}):

{{ comment.comment_text }}

{% if comment.username == current_user.username %}
{% endif %}
{% else %}

No comments yet. Be the first to comment!

{% endfor %}
{% if current_user.is_authenticated %}
{% else %}

You need to log in to post a comment.

{% endif %}
{% endfor %}
{% else %}

{{ username }} hasn't posted yet.

{% endif %} Back to Profile