Getting Started¶
Installation¶
pip install django-staff- Add to
INSTALLED_APPSinsettings.py
How it works¶
Django Staff modifies (monkey patches) Django’s built-in
Usermodel’s admin, adding an inline form to theStaffmodel.Django Staff registers a listener to updates to the
Usermodel.Three possible actions can happen when a
Useris created or changed:- A staff object is created, linked to the user object and permission is added for all available sites.
- The existing staff object is updated, keeping the first name, last name and e-mail in sync and also confirming the active status of the staff object.
- The existing staff object is marked as inactive
Using Django Staff¶
- Create a new
User - Make sure their
staff statusis checked - Click the
Save and continue editingbutton. - When the page reloads, you’ll notice the additional fields at the bottom of the page.