{% extends "layouts/base.html" %} {% load static %} {% block title %} {% if user.pk %} Edit User - {{ user.get_full_name|default:user.username }} {% else %} Add User {% endif %} {% endblock title %} {% block extra_css %} {% endblock extra_css %} {% block breadcrumb %} {% endblock breadcrumb %} {% block content %}
{% csrf_token %}
Basic Information
{{ form.username }} {% if form.username.errors %}
{{ form.username.errors.0 }}
{% endif %}
Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
{{ form.email }} {% if form.email.errors %}
{{ form.email.errors.0 }}
{% endif %}
{{ form.first_name }} {% if form.first_name.errors %}
{{ form.first_name.errors.0 }}
{% endif %}
{{ form.last_name }} {% if form.last_name.errors %}
{{ form.last_name.errors.0 }}
{% endif %}
{% if not user.pk %}
{{ form.password1 }} {% if form.password1.errors %}
{{ form.password1.errors.0 }}
{% endif %}
Your password must contain at least 8 characters.
{{ form.password2 }} {% if form.password2.errors %}
{{ form.password2.errors.0 }}
{% endif %}
Enter the same password as before, for verification.
{% endif %}
Permissions & Groups
{{ form.groups }} {% if form.groups.errors %}
{{ form.groups.errors.0 }}
{% endif %}
The groups this user belongs to. A user will get all permissions granted to each of their groups.
{{ form.user_permissions }} {% if form.user_permissions.errors %}
{{ form.user_permissions.errors.0 }}
{% endif %}
Specific permissions for this user.
{{ form.is_staff }} {% if form.is_staff.errors %}
{{ form.is_staff.errors.0 }}
{% endif %}
Designates whether the user can log into this admin site.
{{ form.is_active }} {% if form.is_active.errors %}
{{ form.is_active.errors.0 }}
{% endif %}
Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
{{ form.is_superuser }} {% if form.is_superuser.errors %}
{{ form.is_superuser.errors.0 }}
{% endif %}
Designates that this user has all permissions without explicitly assigning them.
{% if form.avatar %}
Profile Picture
{% if user.avatar %} Avatar {% else %}
Click to upload
{% endif %}
{% if user.avatar %} {% endif %}
{{ form.avatar }} {% if form.avatar.errors %}
{{ form.avatar.errors.0 }}
{% endif %}
Upload a profile picture. Recommended size: 200x200px
{% endif %}
Preview
{{ user.get_full_name|default:user.username|default:'New User' }}

{{ user.email|default:'user@example.com' }}

{% if user.is_active %} Active {% else %} Inactive {% endif %} {% if user.is_staff %} Staff {% endif %} {% if user.is_superuser %} Superuser {% endif %}
Back to Users {% if user.pk %} View User {% endif %}
{% endblock content %} {% block extra_js %} {% if not user.pk %} {% endif %} {% endblock extra_js %}