scipost.behaviors module¶
-
class
scipost.behaviors.
TimeStampedModel
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
All objects should inherit from this abstract model. This will ensure the creation of created and modified timestamps in the objects.
-
created
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
latest_activity
¶ 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
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
-
get_next_by_latest_activity
(*, field=<scipost.db.fields.AutoDateTimeField: latest_activity>, is_next=True, **kwargs)¶
-
get_previous_by_created
(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)¶
-
get_previous_by_latest_activity
(*, field=<scipost.db.fields.AutoDateTimeField: latest_activity>, is_next=False, **kwargs)¶
-