0% found this document useful (0 votes)
51 views9 pages

Manage Users and Groups in Django Admin

The document discusses managing users and groups in Django's admin interface. It describes how to create a superuser, manage existing users by adding, deleting, or editing them. It also covers creating and managing user groups to assign permissions to categories of users.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views9 pages

Manage Users and Groups in Django Admin

The document discusses managing users and groups in Django's admin interface. It describes how to create a superuser, manage existing users by adding, deleting, or editing them. It also covers creating and managing user groups to assign permissions to categories of users.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MANAGE USERS AND

GROUPS IN DJANGO
ADMIN
CREATING SUPERUSERS
• A superuser is the admin user. Through the superuser, we can manage the entire website or
application. Running the following command creates a superuser:
• python manage.py createsuperuser

• Following this command, you will be prompted to enter a username and password for the
superuser. After confirming your password, the superuser will be created.

• Output
• Superuser created successfully!
MANAGING USERS
• Users represent the different types of people that interact with your site.
• These users might not have the same privileges as the admin, who has complete access to the
website.
• Through the admin/superuser, we can achieve the following:
• Add or delete users
• Edit users’ status
• Edit existing users
• Create user groups
• Add users to groups
• Add or remove user permissions
• Reset passwords
• We can also add users interactively using the admin index page. Simply click the green +
sign next to the Users entry, enter a username and password, and save.
USER PERMISSIONS AND STATUS
• When a user is created, they have no permissions. These permissions are granted by the
superuser and are user-specific.
MANAGING GROUPS

• Groups are a means of categorizing users. This allows for granting permissions to a specific
group. It also saves a lot of time, as compared to granting permissions to each individual
user.

• A user may belong to any number of groups and automatically has all the permissions
granted to that group.

You might also like