shuup.notify.models package¶
Submodules¶
shuup.notify.models.notification module¶
-
class
shuup.notify.models.notification.
NotificationManager
[source]¶ Bases:
django.db.models.manager.Manager
-
class
shuup.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.
Parameters: - id (AutoField) – Id
- recipient_type (EnumIntegerField) – Recipient type
- recipient (ForeignKey to
django.contrib.auth.models.User
) – Recipient - created_on (DateTimeField) – Created on
- message (CharField) – Message
- identifier (InternalIdentifierField) – Do not change this value if you are not sure what you are doing.
- priority (EnumIntegerField) – Priority
- _data (JSONField) – data
- marked_read (BooleanField) – Marked read
- marked_read_by (ForeignKey to
django.contrib.auth.models.User
) – Marked read by - marked_read_on (DateTimeField) – Marked read on
-
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
= <shuup.notify.models.notification.NotificationManager object>¶
-
is_read
¶
-
data
¶
-
exception
DoesNotExist
¶
-
exception
Notification.
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
¶
shuup.notify.models.script module¶
-
class
shuup.notify.models.script.
Script
(id, event_identifier, identifier, created_on, name, enabled, _step_data, template)[source]¶ Bases:
django.db.models.base.Model
Parameters: - id (AutoField) – Id
- event_identifier (CharField) – Event identifier
- identifier (InternalIdentifierField) – Do not change this value if you are not sure what you are doing.
- created_on (DateTimeField) – Created on
- name (CharField) – Name
- enabled (BooleanField) – Enabled
- _step_data (JSONField) – step data
- template (CharField) – the template identifier used to create this script
-
event_class
¶
-
execute
(context)[source]¶ Execute the script in the given context.
Parameters: context (shuup.notify.script.Context) – Script context
-
exception
DoesNotExist
¶
-
exception
Script.
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
shuup.notify.models.
Notification
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
A model for persistent notifications to be shown in the admin, etc.
Parameters: - id (AutoField) – Id
- recipient_type (EnumIntegerField) – Recipient type
- recipient (ForeignKey to
django.contrib.auth.models.User
) – Recipient - created_on (DateTimeField) – Created on
- message (CharField) – Message
- identifier (InternalIdentifierField) – Do not change this value if you are not sure what you are doing.
- priority (EnumIntegerField) – Priority
- _data (JSONField) – data
- marked_read (BooleanField) – Marked read
- marked_read_by (ForeignKey to
django.contrib.auth.models.User
) – Marked read by - marked_read_on (DateTimeField) – Marked read on
-
exception
DoesNotExist
¶
-
exception
Notification.
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.
marked_read_by
¶
-
Notification.
objects
= <shuup.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.
url
¶
-
class
shuup.notify.models.
Script
(id, event_identifier, identifier, created_on, name, enabled, _step_data, template)[source]¶ Bases:
django.db.models.base.Model
Parameters: - id (AutoField) – Id
- event_identifier (CharField) – Event identifier
- identifier (InternalIdentifierField) – Do not change this value if you are not sure what you are doing.
- created_on (DateTimeField) – Created on
- name (CharField) – Name
- enabled (BooleanField) – Enabled
- _step_data (JSONField) – step data
- template (CharField) – the template identifier used to create this script
-
exception
DoesNotExist
¶
-
exception
Script.
MultipleObjectsReturned
¶
-
Script.
event_class
¶
-
Script.
execute
(context)[source]¶ Execute the script in the given context.
Parameters: context (shuup.notify.script.Context) – Script context
-
Script.
get_next_by_created_on
(*moreargs, **morekwargs)¶
-
Script.
get_previous_by_created_on
(*moreargs, **morekwargs)¶
-
Script.
objects
= <django.db.models.manager.Manager object>¶