notifications.models module

class notifications.models.FakeActors(*args, **kwargs)[source]

Bases: django.db.models.base.Model

This 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.Model

A 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.parent is a ForwardManyToOneDescriptor instance.

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.parent is a ForwardManyToOneDescriptor instance.

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_type and object_id fields.

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.parent is a ForwardManyToOneDescriptor instance.

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_type and object_id fields.

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.parent is a ForwardManyToOneDescriptor instance.

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_type and object_id fields.

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>
get_absolute_url()[source]
timesince(now=None)[source]

Shortcut for the django.utils.timesince.timesince function of the current timestamp.

property slug
mark_toggle()[source]
mark_as_read()[source]
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.

mark_as_unread()[source]
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.