models
management.models
¤
Classes¤
PermissionsBase
¤
Bases: Model
Base model for models that require permissions.
Functions¤
set_model_permissions()
classmethod
¤
Set model-level add permissions.
Source code in management\models.py
74 75 76 77 |
|
set_object_permissions()
¤
Set object-level delete, change and view permissions.
Source code in management\models.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
User
¤
Bases: AbstractUser
Custom user model.
All users are given staff status and added to the standard group.
Functions¤
_get_perm_codenames(model)
¤
Helper function to get delete, change and view permission codenames for a given model.
Source code in management\models.py
83 84 85 86 87 88 89 90 91 92 |
|
apply_add_permissions_to_standard_group(model)
¤
Apply model-level add permissions to the standard user group.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model |
Model
|
Model to apply permissions to. |
required |
Source code in management\models.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
|