eggplant.roles package

Submodules

eggplant.roles.admin module

class eggplant.roles.admin.RoleAssignment(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

media

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.parent is a ForwardManyToOneDescriptor instance.

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

eggplant.roles.urls module

eggplant.roles.views module

eggplant.roles.views.accountant(request)[source]
eggplant.roles.views.cashier(request)[source]
eggplant.roles.views.communicator(request)[source]
eggplant.roles.views.packer(request)[source]
eggplant.roles.views.purchaser(request)[source]
eggplant.roles.views.role(request, role)[source]

Module contents