shuup.tasks.admin_module.views package

Submodules

shuup.tasks.admin_module.views.edit module

class shuup.tasks.admin_module.views.edit.QuickAddTaskTypeSelect(attrs=None, choices=(), editable_model=None, initial=None, model=None)[source]

Bases: QuickAddRelatedObjectSelect

Parameters:

int (initial) – primary key of the object that is initially selected

url = '/sa/task_type/new/'
property media
class shuup.tasks.admin_module.views.edit.TaskTypeForm(*args, **kwargs)[source]

Bases: MultiLanguageModelForm

class Meta[source]

Bases: object

model

alias of TaskType

exclude = ('shop',)
__init__(*args, **kwargs)[source]
save(**kwargs)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

base_fields = {'identifier': <django.forms.fields.CharField object>, 'name': <django.forms.fields.CharField object>}
declared_fields = {'name': <django.forms.fields.CharField object>}
property media

Return all media required to render the widgets on this form.

class shuup.tasks.admin_module.views.edit.TaskForm(*args, **kwargs)[source]

Bases: ModelForm

class Meta[source]

Bases: object

model

alias of Task

exclude = ('shop', 'created_on', 'modified_on', 'status', 'completed_on', 'completed_by', 'creator')
widgets = {'type': <shuup.tasks.admin_module.views.edit.QuickAddTaskTypeSelect object>}
__init__(*args, **kwargs)[source]
save(**kwargs)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

base_fields = {'assigned_to': <django.forms.models.ModelChoiceField object>, 'name': <django.forms.fields.CharField object>, 'priority': <django.forms.fields.IntegerField object>, 'type': <django.forms.models.ModelChoiceField object>}
declared_fields = {}
property media

Return all media required to render the widgets on this form.

class shuup.tasks.admin_module.views.edit.TaskCommentForm(*args, **kwargs)[source]

Bases: ModelForm

class Meta[source]

Bases: object

model

alias of TaskComment

exclude = ('task', 'created_on', 'modified_on', 'author')
__init__(*args, **kwargs)[source]
save(**kwargs)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

base_fields = {'body': <django.forms.fields.CharField object>, 'visibility': <enumfields.forms.EnumChoiceField object>}
declared_fields = {}
property media

Return all media required to render the widgets on this form.

class shuup.tasks.admin_module.views.edit.BaseTaskViewMixin[source]

Bases: object

get_queryset()[source]
class shuup.tasks.admin_module.views.edit.TaskTypeEditView(**kwargs)[source]

Bases: CreateOrUpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

model

alias of TaskType

form_class

alias of TaskTypeForm

template_name = 'shuup/admin/tasks/task_type_edit.jinja'
context_object_name = 'task_type'
get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

get_form_kwargs(**kwargs)[source]

Return the keyword arguments for instantiating the form.

class shuup.tasks.admin_module.views.edit.TaskEditView(**kwargs)[source]

Bases: BaseTaskViewMixin, CreateOrUpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

model

alias of Task

template_name = 'shuup/admin/tasks/task_edit.jinja'
context_object_name = 'task'
fields = ()
get_form_class()[source]

Return the form class to use in this view.

get_toolbar()[source]
get_form(form_class=None)[source]

Return an instance of the form to be used in this view.

save_form(form)[source]
get_context_data(**kwargs)[source]

Insert the form into the context dict.

class shuup.tasks.admin_module.views.edit.TaskDeleteView(**kwargs)[source]

Bases: BaseTaskViewMixin, DeleteView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

model

alias of Task

success_url = '/sa/tasks/'
class shuup.tasks.admin_module.views.edit.TaskSetStatusView(**kwargs)[source]

Bases: BaseTaskViewMixin, BaseDetailView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

get(request, *args, **kwargs)[source]
post(request, *args, **kwargs)[source]

shuup.tasks.admin_module.views.list module

class shuup.tasks.admin_module.views.list.TaskListView[source]

Bases: PicotableListView

model

alias of Task

default_columns = [<Column: Name> name, <Column: Creator> creator, <Column: Status> status, <Column: Priority> priority, <Column: Comments> comments]
toolbar_buttons_provider_key: str | None = 'task_list_toolbar_provider'
mass_actions_provider_key: str | None = 'task_list_actions_provider'
get_comments_count(instance, **kwargs)[source]
get_queryset()[source]

Return a queryset of Task objects filtered for the current shop.

This method retrieves the current shop from the request and returns all Task instances associated with that shop using the custom ‘for_shop’ manager method.

Returns:

A queryset of Task objects for the current shop.

Return type:

QuerySet

get_creator_name_display(instance, **kwargs)[source]
get_priority_display(instance, **kwargs)[source]
class shuup.tasks.admin_module.views.list.TaskTypeListView[source]

Bases: PicotableListView

model

alias of TaskType

default_columns = [<Column: Name> name]
get_queryset()[source]

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

Module contents

class shuup.tasks.admin_module.views.TaskEditView(**kwargs)[source]

Bases: BaseTaskViewMixin, CreateOrUpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

context_object_name = 'task'
fields = ()
get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form(form_class=None)[source]

Return an instance of the form to be used in this view.

get_form_class()[source]

Return the form class to use in this view.

get_toolbar()[source]
model

alias of Task

save_form(form)[source]
template_name = 'shuup/admin/tasks/task_edit.jinja'
class shuup.tasks.admin_module.views.TaskListView[source]

Bases: PicotableListView

default_columns = [<Column: Name> name, <Column: Creator> creator, <Column: Status> status, <Column: Priority> priority, <Column: Comments> comments]
get_comments_count(instance, **kwargs)[source]
get_creator_name_display(instance, **kwargs)[source]
get_priority_display(instance, **kwargs)[source]
get_queryset()[source]

Return a queryset of Task objects filtered for the current shop.

This method retrieves the current shop from the request and returns all Task instances associated with that shop using the custom ‘for_shop’ manager method.

Returns:

A queryset of Task objects for the current shop.

Return type:

QuerySet

mass_actions_provider_key: str | None = 'task_list_actions_provider'
model

alias of Task

toolbar_buttons_provider_key: str | None = 'task_list_toolbar_provider'
class shuup.tasks.admin_module.views.TaskDeleteView(**kwargs)[source]

Bases: BaseTaskViewMixin, DeleteView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

model

alias of Task

success_url = '/sa/tasks/'
class shuup.tasks.admin_module.views.TaskSetStatusView(**kwargs)[source]

Bases: BaseTaskViewMixin, BaseDetailView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

get(request, *args, **kwargs)[source]
post(request, *args, **kwargs)[source]
class shuup.tasks.admin_module.views.TaskTypeListView[source]

Bases: PicotableListView

default_columns = [<Column: Name> name]
get_queryset()[source]

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

model

alias of TaskType

class shuup.tasks.admin_module.views.TaskTypeEditView(**kwargs)[source]

Bases: CreateOrUpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

context_object_name = 'task_type'
form_class

alias of TaskTypeForm

get_form_kwargs(**kwargs)[source]

Return the keyword arguments for instantiating the form.

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

model

alias of TaskType

template_name = 'shuup/admin/tasks/task_type_edit.jinja'