shoop.notify.models package

Submodules

shoop.notify.models.notification module

class shoop.notify.models.notification.NotificationManager[source]

Bases: django.db.models.manager.Manager

for_user(user)[source]
unread_for_user(user)[source]
class shoop.notify.models.notification.Notification(*args, **kwargs)[source]

Bases: django.db.models.base.Model

A model for persistent notifications to be shown in the admin, etc.

recipient_type

A placeholder class that provides a way to set the attribute on the model.

recipient
priority

A placeholder class that provides a way to set the attribute on the model.

marked_read_by
objects = <shoop.notify.models.notification.NotificationManager object>
save(*args, **kwargs)[source]
mark_read(user)[source]
is_read
data
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception Notification.MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

Notification.get_next_by_created_on(*moreargs, **morekwargs)
Notification.get_previous_by_created_on(*moreargs, **morekwargs)
Notification.get_priority_display(*moreargs, **morekwargs)
Notification.get_recipient_type_display(*moreargs, **morekwargs)
Notification.url
Notification.set_reverse_url(**reverse_kwargs)[source]

shoop.notify.models.script module

class shoop.notify.models.script.Script(id, event_identifier, identifier, created_on, name, enabled, _step_data)[source]

Bases: django.db.models.base.Model

get_steps()[source]

:rtype Iterable[Step]

set_steps(steps)[source]
get_serialized_steps()[source]
set_serialized_steps(serialized_data)[source]
event_class
execute(context)[source]

Execute the script in the given context.

Parameters:context (shoop.notify.script.Context) – Script context
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception Script.MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

Script.get_next_by_created_on(*moreargs, **morekwargs)
Script.get_previous_by_created_on(*moreargs, **morekwargs)
Script.objects = <django.db.models.manager.Manager object>

Module contents

class shoop.notify.models.Notification(*args, **kwargs)[source]

Bases: django.db.models.base.Model

A model for persistent notifications to be shown in the admin, etc.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception Notification.MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

Notification.data
Notification.get_next_by_created_on(*moreargs, **morekwargs)
Notification.get_previous_by_created_on(*moreargs, **morekwargs)
Notification.get_priority_display(*moreargs, **morekwargs)
Notification.get_recipient_type_display(*moreargs, **morekwargs)
Notification.is_read
Notification.mark_read(user)[source]
Notification.marked_read_by
Notification.objects = <shoop.notify.models.notification.NotificationManager object>
Notification.priority

A placeholder class that provides a way to set the attribute on the model.

Notification.recipient
Notification.recipient_type

A placeholder class that provides a way to set the attribute on the model.

Notification.save(*args, **kwargs)[source]
Notification.set_reverse_url(**reverse_kwargs)[source]
Notification.url
class shoop.notify.models.Script(id, event_identifier, identifier, created_on, name, enabled, _step_data)[source]

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception Script.MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

Script.event_class
Script.execute(context)[source]

Execute the script in the given context.

Parameters:context (shoop.notify.script.Context) – Script context
Script.get_next_by_created_on(*moreargs, **morekwargs)
Script.get_previous_by_created_on(*moreargs, **morekwargs)
Script.get_serialized_steps()[source]
Script.get_steps()[source]

:rtype Iterable[Step]

Script.objects = <django.db.models.manager.Manager object>
Script.set_serialized_steps(serialized_data)[source]
Script.set_steps(steps)[source]