eggplant.roles package¶
Subpackages¶
Submodules¶
eggplant.roles.admin module¶
eggplant.roles.models module¶
-
class
eggplant.roles.models.RoleAssignment(id, role, user)[source]¶ Bases:
django.db.models.base.Model-
ACCOUNTANT= 'accountant'¶
-
CASHIER= 'cashier'¶
-
COMMUNICATOR= 'communicator'¶
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
PACKER= 'packer'¶
-
PURCHASER= 'purchaser'¶
-
ROLE_CHOICES= (('purchaser', <django.utils.functional.__proxy__ object>), ('communicator', <django.utils.functional.__proxy__ object>), ('packer', <django.utils.functional.__proxy__ object>), ('cashier', <django.utils.functional.__proxy__ object>), ('accountant', <django.utils.functional.__proxy__ object>))¶
-
get_role_display(*moreargs, **morekwargs)¶
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
role¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
user¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parentis aForwardManyToOneDescriptorinstance.
-
user_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-