Admin Blueprint¶
Overview¶
The admin blueprint handles all the admin related functionality including user management. It is registered under the /admin URL prefix.
Routes¶
URL |
Method |
Description |
|---|---|---|
|
GET, POST |
Renders the dashboard form. Shows all the users registered with options to toggle admin, unblock user and delete user. |
|
POST |
Allows the admin to add an admin or remove an admin. Cannot be used on yourself. |
|
POST |
Allows admins to delete users registered in the system. Cannot be used on yourself |
|
POST |
Unblocks a user and resets their failed login attempts. |
Access Control¶
All routes require @login_required and @admin_required.
Forms¶
ToggleAdminForm— submitDeleteUserForm— submitUnblockUserForm— submit
Templates¶
admin/admin-dashboard.html