TOTPDevice
Overview
Stores a two-factor authentication device for a user. Links a django-allauthAuthenticator to a user and records the delivery method (TOTP app, SMS, or email) along with the relevant contact detail (phone number or email address).
DoesNotExist
The requested object does not exist
Source
server/vueda/user/models.py
MultipleObjectsReturned
The query returned multiple objects when only one was expected.
Source
server/vueda/user/models.py
str {#str}
Return str(self).
Signature {#str-signature}
__str__(self)
Parameters {#str-parameters}
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes |
Source {#str-source}
server/vueda/user/models.py:216
email
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
Signature
email(unknown)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| unknown | yes |
get_formatted_name
Return the human-readable label for the authentication method.
Signature
get_formatted_name(self)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes |
Returns
<class 'str'>
Source
server/vueda/user/models.py:229
get_method_display
Method descriptor with partial application of the given arguments and keywords.
Supports wrapping existing descriptors and handles non-descriptor callables as instance methods.
Signature
get_method_display(unknown)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| unknown | yes |
id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
Signature
id(unknown)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| unknown | yes |
method
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
Signature
method(unknown)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| unknown | yes |
pgh_event_model
A descriptor for accessing the pgh_event_model field on a tracked model
Signature
pgh_event_model(unknown)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| unknown | yes |
_meta
_vueda_options
authenticator
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example::
class Child(Model):
parent = ForeignKey(Parent, related_name='children')
Child.parent is a ForwardManyToOneDescriptor instance.
authenticator_id
events
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example::
class Child(Model):
parent = ForeignKey(Parent, related_name='children')
Parent.children is a ReverseManyToOneDescriptor instance.
Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.
formatted_name
pgh_event_models
phone_number
The descriptor for the phone number attribute on the model instance. Returns a PhoneNumber when accessed so you can do stuff like::
>>> instance.phone_number.as_international
Assigns a phone number object on assignment so you can do::
>>> instance.phone_number = PhoneNumber(...)
or,
>>> instance.phone_number = '+414204242'
user
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example::
class Child(Model):
parent = ForeignKey(Parent, related_name='children')
Child.parent is a ForwardManyToOneDescriptor instance.
user_id
Source
server/vueda/user/models.py:198