{% if user_profile.is_superuser %}
User type: Superuser
{% elif user_profile.user_type == 0 %}
User type: User
{% elif user_profile.user_type == 1 %}
User type: Admin
{% elif user_profile.user_type == 2 %}
User type: ML Engineer
{% elif user_profile.user_type == 3 %}
User type: Accountant
{% else %}
User type: Unknown
{% endif %}
Tokens:
{{ token_count }}
{% if user_profile.user_type == 2 or user.is_superuser %}
{% endif %}
{% if user_profile.user_type == 3 or user.is_superuser or user_profile.user_type == 1 %}
Generate Financial Statement
{% endif %}
{% if user_profile.user_type == 2 or user.is_superuser or user_profile.user_type == 1%}
Upload Machine Learning Model
{% comment %} AI content {% endcomment %} {% endif%}
{% if user_profile.user_type == 2 or user.is_superuser %}
{% endif %}
General information
{% if user.email %}
{{ user.email }}
{% else %}
No email address on record.
{% endif %}
{{ user.username }}
User History
Date |
Action |
Details |
{% for entry in user_data %}
{{entry.date}} |
{{entry.action}} |
{% if entry.file %}
Filename: {{entry.file}}
{% elif entry.description %}
{{ entry.description }}
{% endif %}
|
{%endfor%}
{% if 1 %} {% comment %} REPLACE WITH LOGIC TO CHECK PROPER USER {% endcomment %}
{% if user_profile.user_type == 2 or user.is_superuser %}
Application Logs
Date |
Action |
User ID |
Status |
Feedback |
{% for entry in admin_data %}
{{entry.date}}
|
{{entry.action}}
{% if entry.description %}
{% endif %}
|
{{entry.user}} |
{{entry.status}} |
{% if entry.feedback is not None %}
{% if entry.feedback %}
Liked
{% else %}
Disliked
{% endif %}
{% else %}
N/A
{% endif %}
|
{% endfor %}
{% endif %}
{% if user.is_superuser or user_profile.user_type == 1 %}
User Management
Username |
User Type |
Actions |
{% for user_profile in all_user_profiles %}
{{ user_profile.user.username }} |
{{ user_profile.get_user_type_display }} |
|
{% endfor %}
{% endif %}
{% endif %} {% comment %} Admin page functionality end {% endcomment %}
{% endblock content %}
{% block scripts %}
{% endblock scripts %}