November 2015
Beginner to intermediate
840 pages
26h 30m
English
Taking a page from UNIX’s security policy, Django’s auth app defines not only a User model but also Permission and Group models. These two new models are the central focus of this chapter.
User, Permission, and Group are all related by many-to-many relations. A User may belong to a Group, and a Group may be related to multiple User instances. Similarly, we can define Permission instances to limit behavior on both User and Group instances.
Permission instances are often described code by the string format '<app>. <behavior>_<model>', where behavior is one of add, change, or delete. For instance, the string 'blog.change_post' is the permission to modify Post objects. A Permission limits control ...
Read now
Unlock full access