{% if user.is_superuser %} {% include 'registration/password_change_done_admin.html' %} {% elif user.first_name == 'student' %} {% include 'registration/password_change_done_student.html' %} {% else %} You do not have permission to change password! {% endif %}