Skip to content

Knowledgebase

Creating and protecting a Django administrator account

development

The Django administrator interface grants access according to staff status and permissions. Use individual accounts and give routine editors only the permissions their work requires.

Check access and requirements

Confirm database migrations are applied and use the production settings deliberately. Plan a separate administrator recovery path and protect the email address used for account recovery.

01 Create and protect a Django administrator account

  1. Create the initial authorised administrator with python manage.py createsuperuser in the application environment. Enter credentials through the prompt rather than placing a password in a recorded command.

  2. Serve the interface over HTTPS and verify secure session behavior. Keep development debugging disabled.

  3. Create ordinary staff accounts and assign appropriate groups and model permissions. Reserve superuser access for the small number of people who actually need all permissions.

  4. Review third-party authentication or MFA extensions for maintenance and compatibility before enabling them. Django core configuration alone should not be assumed to provide every extra login control.

  5. Test the administrator role and a limited staff role separately. Record account ownership and remove access promptly when a team member leaves.

Confirm the expected result

Confirm the limited account can perform its intended task and cannot access unrelated customer or configuration data. Test the documented account recovery process with an authorised test account.

Resolve setup problems

If login fails, check active and staff status, authentication backend, cookies and HTTPS handling. Use the supported password change command for authorised recovery rather than editing password hashes manually.

A common question

Should all developers share the superuser login?

Individual accounts provide clearer accountability and allow one person’s access to be removed without changing everyone’s credentials. Share secrets only through an approved access-management process.

Sources and further reading

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support

Powered by WHMCompleteSolution