Package django :: Package contrib :: Package auth :: Module models :: Class Permission
[hide private]
[frames] | no frames]

Class Permission

source code

db.models.Model --+
                  |
                 Permission

The permissions system provides a way to assign permissions to specific users and groups of users.

The permission system is used by the Django admin site, but may also be useful in your own code. The Django admin site uses permissions as follows:

Permissions are set globally per type of object, not per specific object instance. It is possible to say "Mary may change news stories," but it's not currently possible to say "Mary may change news stories, but only the ones she created herself" or "Mary may only change news stories that have a certain status or publication date."

Three basic permissions -- add, change and delete -- are automatically created for each Django model.

Nested Classes [hide private]
  Meta
Instance Methods [hide private]
 
__unicode__(self) source code
Class Variables [hide private]
  name = models.CharField(_('name'), max_length= 50)
  content_type = models.ForeignKey(ContentType)
  codename = models.CharField(_('codename'), max_length= 100)