{% extends "admin/base.html" %} {% block title %}{{ user.nickname }} - User Details{% endblock %} {% block admin_content %}

User Details

User Information
Nickname: {{ user.nickname }}
Email: {{ user.email }}
Role: {% if user.is_admin %} Admin {% else %} User {% endif %}
Status: {% if user.is_active %} Active {% else %} Inactive {% endif %}
Joined: {{ user.created_at.strftime('%Y-%m-%d %H:%M:%S') }}
Last Updated: {{ user.updated_at.strftime('%Y-%m-%d %H:%M:%S') }}
Statistics
Total Posts: {{ user_posts|length }}
Published Posts: {{ user_posts|selectattr('published')|list|length }}
Pending Posts: {{ user_posts|rejectattr('published')|list|length }}
Comments: {{ user_comments|length }}
Likes Given: {{ user.likes.count() }}
Posts ({{ user_posts|length }})
{% if user_posts %}
{% for post in user_posts %} {% endfor %}
Title Status Created Actions
{{ post.title[:50] }}{% if post.title|length > 50 %}...{% endif %} {% if post.published %} Published {% else %} Pending {% endif %} {{ post.created_at.strftime('%Y-%m-%d') }}
{% else %}

This user has not created any posts yet.

{% endif %}
Recent Comments ({{ user_comments|length }})
{% if user_comments %} {% for comment in user_comments[:10] %}

{{ comment.content[:200] }}{% if comment.content|length > 200 %}...{% endif %}

On post: {{ comment.post.title }}
{{ comment.created_at.strftime('%Y-%m-%d') }}
{% endfor %} {% if user_comments|length > 10 %}

... and {{ user_comments|length - 10 }} more comments

{% endif %} {% else %}

This user has not made any comments yet.

{% endif %}
{% endblock %}