eggplant.invitations package

Submodules

eggplant.invitations.admin module

class eggplant.invitations.admin.DepartmentInvitationAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

media

eggplant.invitations.auth_backends module

class eggplant.invitations.auth_backends.InvitationBackend[source]

Bases: django.contrib.auth.backends.ModelBackend

authenticate(**credentials)[source]

Authenticate only invited users with not completed profile.

eggplant.invitations.forms module

class eggplant.invitations.forms.AcceptInvitationForm(data=None, files=None, auto_id=u'id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None)[source]

Bases: django.forms.forms.Form

base_fields = OrderedDict([('captcha', <captcha.fields.ReCaptchaField object>)])
declared_fields = OrderedDict([('captcha', <captcha.fields.ReCaptchaField object>)])
media
class eggplant.invitations.forms.DepartmentInvitationForm(data=None, files=None, auto_id=u'id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None)[source]

Bases: django.forms.models.ModelForm

class Meta[source]
fields = ['department', 'account_category', 'email']
model

alias of DepartmentInvitation

base_fields = OrderedDict([('department', <django.forms.models.ModelChoiceField object>), ('account_category', <django.forms.models.ModelChoiceField object>), ('email', <django.forms.fields.EmailField object>)])
declared_fields = OrderedDict([('email', <django.forms.fields.EmailField object>)])
media

eggplant.invitations.models module

class eggplant.invitations.models.DepartmentInvitation(id, email, accepted, accepted_at, verification_key, created, invited_by, department, account_category)[source]

Bases: eggplant.invitations.models.InvitationBase

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

account_category

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.

account_category_id

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

department

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.

department_id

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

get_next_by_created(*moreargs, **morekwargs)
get_previous_by_created(*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.

invited_by

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.

objects = <django.db.models.manager.Manager object>
class eggplant.invitations.models.InvitationBase(*args, **kwargs)[source]

Bases: django.db.models.base.Model

class Meta[source]
abstract = False
permissions = (('can_invite', 'Can send invitation'),)
accepted

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

accepted_at

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

created

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

email

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

get_next_by_created(*moreargs, **morekwargs)
get_previous_by_created(*moreargs, **morekwargs)
invited_by

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.

invited_by_id

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

verification_key

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

eggplant.invitations.models.send_email_invitation(*args, **kwargs)[source]

TODO: Implement an HTML message, commenting out the html_* lines below

eggplant.invitations.tests module

eggplant.invitations.urls module

eggplant.invitations.utils module

eggplant.invitations.utils.create_verified_user(invitation)[source]

eggplant.invitations.views module

exception eggplant.invitations.views.AlreadyAcceptedInvitationException[source]

Bases: exceptions.Exception

eggplant.invitations.views.accept_invitation(request, verification_key)[source]

Accept invitation.

eggplant.invitations.views.do_accept_invitation(request, invitation)[source]
eggplant.invitations.views.invite(request, *args, **kwargs)[source]

Invite a new email address.

Module contents