intranet.apps.sessionmgmt package¶
Submodules¶
intranet.apps.sessionmgmt.admin module¶
intranet.apps.sessionmgmt.helpers module¶
intranet.apps.sessionmgmt.models module¶
-
class
intranet.apps.sessionmgmt.models.
TrustedSession
(id, description, device_type, user, session_key, first_trusted_date)[source]¶ Bases:
django.db.models.base.Model
-
DEVICE_TYPES
= (('mobile', 'Mobile'), ('tablet', 'Tablet'), ('computer', 'Computer'), ('unknown', 'Unknown type'))¶
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
classmethod
delete_expired_sessions
(*, user=None) → None[source]¶ Deletes all expired trusted sessions for the given user. If
user
isNone
or not given, deletes all expired trusted sessions.- Parameters
user – The user to delete all expired trusted sessions for, or
None
to delete all expired trusted sessions
-
description
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
device_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
first_trusted_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_device_type_display
(*, field=<django.db.models.fields.CharField: device_type>)¶
-
get_next_by_first_trusted_date
(*, field=<django.db.models.fields.DateTimeField: first_trusted_date>, is_next=True, **kwargs)¶
-
get_previous_by_first_trusted_date
(*, field=<django.db.models.fields.DateTimeField: first_trusted_date>, is_next=False, **kwargs)¶
-
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>¶
-
session_key
¶ 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 (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
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.
-