shuup.tasks package

Subpackages

Submodules

shuup.tasks.apps module

class shuup.tasks.apps.AppConfig(*args, **kwargs)[source]

Bases: AppConfig

name = 'shuup.tasks'
label = 'shuup_tasks'
default_auto_field = 'django.db.models.BigAutoField'
provides = {'admin_module': ['shuup.tasks.admin_module.TaskAdminModule', 'shuup.tasks.admin_module.TaskTypeAdminModule']}

See /provides for details about the provides variable.

shuup.tasks.models module

class shuup.tasks.models.TaskStatus(value)[source]

Bases: Enum

NEW = 1
IN_PROGRESS = 2
COMPLETED = 3
DELETED = 4
class shuup.tasks.models.TaskCommentVisibility(value)[source]

Bases: Enum

PUBLIC = 1
STAFF_ONLY = 2
ADMINS_ONLY = 3
class shuup.tasks.models.TaskType(id, identifier, shop)[source]

Bases: TranslatableModel

identifier

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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

translations

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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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

Descriptor for translated attributes.

This attribute proxies all get/set calls to the translated model.

shop_id
tasks

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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class shuup.tasks.models.TaskQuerySet(model=None, query=None, using=None, hints=None)[source]

Bases: QuerySet

completed()[source]
in_progress()[source]
is_new()[source]
for_shop(shop)[source]
delete()[source]

Delete the records in the current QuerySet.

assigned_to(contact)[source]
class shuup.tasks.models.Task(id, shop, name, type, status, priority, creator, assigned_to, completed_by, completed_on, created_on, modified_on)[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 a ForwardManyToOneDescriptor instance.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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.

status
priority

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

creator

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.

assigned_to

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.

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

completed_on

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.

modified_on

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.ManagerFromTaskQuerySet object>
assign(user)[source]
delete()[source]
comment(contact, comment, visibility=TaskCommentVisibility.PUBLIC)[source]
set_in_progress()[source]
set_completed(contact)[source]
get_completion_time()[source]
exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

add_log_entry(message, identifier=None, kind=LogEntryKind.OTHER, user=None, extra=None, save=True)
assigned_to_id
comments

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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

completed_by_id
creator_id
get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)
get_next_by_modified_on(*, field=<django.db.models.fields.DateTimeField: modified_on>, is_next=True, **kwargs)
get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)
get_previous_by_modified_on(*, field=<django.db.models.fields.DateTimeField: modified_on>, is_next=False, **kwargs)
get_status_display(*, field=<enumfields.fields.EnumIntegerField: status>)
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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

shop_id
type_id
class shuup.tasks.models.TaskCommentQuerySet(model=None, query=None, using=None, hints=None)[source]

Bases: QuerySet

for_contact(contact)[source]
class shuup.tasks.models.TaskComment(id, task, author, visibility, body, created_on, modified_on)[source]

Bases: Model

task

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.

author

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.

visibility
body

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.

modified_on

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.ManagerFromTaskCommentQuerySet object>
reply(contact, body)[source]
as_html()[source]
can_see(user)[source]
exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

author_id
get_next_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=True, **kwargs)
get_next_by_modified_on(*, field=<django.db.models.fields.DateTimeField: modified_on>, is_next=True, **kwargs)
get_previous_by_created_on(*, field=<django.db.models.fields.DateTimeField: created_on>, is_next=False, **kwargs)
get_previous_by_modified_on(*, field=<django.db.models.fields.DateTimeField: modified_on>, is_next=False, **kwargs)
get_visibility_display(*, field=<enumfields.fields.EnumIntegerField: visibility>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

task_id
class shuup.tasks.models.TaskLogEntry(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
logged_model

alias of Task

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

class shuup.tasks.models.TaskTypeTranslation(id, language_code, name, master)

Bases: TranslatedFieldsModel

exception DoesNotExist

Bases: TranslationDoesNotExist, DoesNotExist, DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

get_language_code_display(*, field=<parler.utils.compat.HideChoicesCharField: language_code>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

master

The mandatory Foreign key field to the shared model.

master_id
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>

shuup.tasks.utils module

shuup.tasks.utils.create_task(shop, creator, task_type, task_name, comment=None, **kwargs)[source]

Module contents