shuup.notify.models package
Submodules
shuup.notify.models.email_template module
- class shuup.notify.models.email_template.EmailTemplate(id, name, template)[source]
Bases:
Model
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- template
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:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
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>
shuup.notify.models.notification module
- class shuup.notify.models.notification.Notification(*args, **kwargs)[source]
Bases:
Model
A model for persistent notifications to be shown in the admin, etc.
- shop
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 aForwardManyToOneDescriptor
instance.
- recipient_type
- 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 aForwardManyToOneDescriptor
instance.
- created_on
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- message
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- identifier
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- priority
- marked_read
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- marked_read_by
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 aForwardManyToOneDescriptor
instance.
- marked_read_on
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <shuup.notify.models.notification.NotificationManager object>
- save(*args, **kwargs)[source]
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- property is_read
- property data
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)
- get_priority_display(*, field=<enumfields.fields.EnumIntegerField: priority>)
- get_recipient_type_display(*, field=<enumfields.fields.EnumIntegerField: recipient_type>)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- marked_read_by_id
- recipient_id
- shop_id
- property url
shuup.notify.models.script module
- class shuup.notify.models.script.Script(id, shop, event_identifier, identifier, created_on, name, enabled, _step_data, template)[source]
Bases:
Model
- shop
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 aForwardManyToOneDescriptor
instance.
- event_identifier
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- identifier
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_on
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- enabled
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- template
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property event_class
- execute(context)[source]
Execute the script in the given context.
- Parameters:
context (shuup.notify.script.Context) – Script context
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- add_log_entry(message, identifier=None, kind=LogEntryKind.OTHER, user=None, extra=None, save=True)
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, 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.
- log_entries
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- objects = <django.db.models.manager.Manager object>
- shop_id
- class shuup.notify.models.script.ScriptLogEntry(id, created_on, user, message, identifier, kind, extra, target)
Bases:
BaseLogEntry
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- get_kind_display(*, field=<enumfields.fields.EnumIntegerField: kind>)
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, 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.
- kind
- objects = <django.db.models.manager.Manager object>
- target
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 aForwardManyToOneDescriptor
instance.
- target_id
- user
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 aForwardManyToOneDescriptor
instance.
Module contents
- class shuup.notify.models.EmailTemplate(id, name, template)[source]
Bases:
Model
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name
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>
- template
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class shuup.notify.models.Notification(*args, **kwargs)[source]
Bases:
Model
A model for persistent notifications to be shown in the admin, etc.
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- created_on
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property data
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)
- get_priority_display(*, field=<enumfields.fields.EnumIntegerField: priority>)
- get_recipient_type_display(*, field=<enumfields.fields.EnumIntegerField: recipient_type>)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- identifier
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property is_read
- marked_read
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- marked_read_by
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 aForwardManyToOneDescriptor
instance.
- marked_read_by_id
- marked_read_on
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- message
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <shuup.notify.models.notification.NotificationManager object>
- priority
- 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 aForwardManyToOneDescriptor
instance.
- recipient_id
- recipient_type
- save(*args, **kwargs)[source]
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- shop
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 aForwardManyToOneDescriptor
instance.
- shop_id
- property url
- class shuup.notify.models.Script(id, shop, event_identifier, identifier, created_on, name, enabled, _step_data, template)[source]
Bases:
Model
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- add_log_entry(message, identifier=None, kind=LogEntryKind.OTHER, user=None, extra=None, save=True)
- created_on
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- enabled
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property event_class
- event_identifier
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- execute(context)[source]
Execute the script in the given context.
- Parameters:
context (shuup.notify.script.Context) – Script context
- get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)
- get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, 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.
- identifier
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- log_entries
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- name
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>
- shop
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 aForwardManyToOneDescriptor
instance.
- shop_id
- template
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.