November 2015
Beginner to intermediate
840 pages
26h 30m
English
Groups are an easy way to organize permissions. Typically, it’s best not to assign permissions to users directly. Instead, you create groups (such as administrator, manager, etc.) that have different levels of permissions. Users who belong to these groups inherit the permissions of the group.
Developers often confuse the is_staff and is_superuser fields on the User model with Group instances. By default, there are no groups defined, as shown in Example 20.20.
Example 20.20: Python Interpreter Code
>>> from django.contrib.auth.models import Group >>> Group.objects.all() []
Our site is going to need capable users whom we trust to update the website with valid information. We can create ...
Read now
Unlock full access