notifications.models module¶
-
class
notifications.models.FakeActors(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelThis Model acts as a surrogate person that either is unknown, deceased, fake, etc. etc.
-
name¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
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>¶
-
-
class
notifications.models.Notification(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelA short message meant for one user.
Action model describing the actor acting out a verb (on an optional target). Nomenclature based on http://activitystrea.ms/specs/atom/1.0/
- Generalized Format::
<actor> <verb> <time> <actor> <verb> <target> <time> <actor> <verb> <action_object> <target> <time>
- Examples::
<justquick> <reached level 60> <1 minute ago> <brosner> <commented on> <pinax/pinax> <2 hours ago> <washingtontimes> <started follow> <justquick> <8 minutes ago> <mitsuhiko> <closed> <issue 70> on <mitsuhiko/flask> <about 2 hours ago>
- Unicode Representation::
justquick reached level 60 1 minute ago mitsuhiko closed issue 70 on mitsuhiko/flask 3 hours ago
-
LEVELS= (('success', 'Success'), ('info', 'Info'), ('warning', 'Warning'), ('error', 'Error'))¶
-
level¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
recipient¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
unread¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
pseudo_unread¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
actor_content_type¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
actor_object_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
actor¶ Provide a generic many-to-one relation through the
content_typeandobject_idfields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
verb¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
description¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
target_content_type¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
target_object_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
target¶ Provide a generic many-to-one relation through the
content_typeandobject_idfields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
action_object_content_type¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
action_object_object_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
action_object¶ Provide a generic many-to-one relation through the
content_typeandobject_idfields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
created¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
internal_type¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
url_code¶ 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.ManagerFromNotificationQuerySet object>¶
-
timesince(now=None)[source]¶ Shortcut for the
django.utils.timesince.timesincefunction of the current timestamp.
-
property
slug¶
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
action_object_content_type_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
actor_content_type_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_internal_type_display(*, field=<django.db.models.fields.CharField: internal_type>)¶
-
get_level_display(*, field=<django.db.models.fields.CharField: level>)¶
-
get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)¶
-
get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, 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.
-
recipient_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
target_content_type_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.