shuup.admin.modules.sample_data package

Submodules

shuup.admin.modules.sample_data.data module

shuup.admin.modules.sample_data.factories module

shuup.admin.modules.sample_data.factories.create_sample_category(name, description, business_segment, image_file, shop)[source]
shuup.admin.modules.sample_data.factories.create_sample_product(name, description, business_segment, image_file, shop)[source]

shuup.admin.modules.sample_data.forms module

class shuup.admin.modules.sample_data.forms.SampleObjectsWizardForm(**kwargs)[source]

Bases: django.forms.forms.Form

BUSINESS_SEGMENT_CHOICES = [('default', <django.utils.functional.lazy.<locals>.__proxy__ object at 0x7fabcc4c3b38>)]
base_fields = OrderedDict([('business_segment', <django.forms.fields.ChoiceField object at 0x7fabccbaecf8>), ('categories', <django.forms.fields.BooleanField object at 0x7fabccec2b70>), ('products', <django.forms.fields.BooleanField object at 0x7fabccec22b0>)])
declared_fields = OrderedDict([('business_segment', <django.forms.fields.ChoiceField object at 0x7fabccbaecf8>), ('categories', <django.forms.fields.BooleanField object at 0x7fabccec2b70>), ('products', <django.forms.fields.BooleanField object at 0x7fabccec22b0>)])
media
class shuup.admin.modules.sample_data.forms.ConsolidateObjectsForm(**kwargs)[source]

Bases: django.forms.forms.Form

base_fields = OrderedDict()
declared_fields = OrderedDict()
media

shuup.admin.modules.sample_data.manager module

shuup.admin.modules.sample_data.manager.get_installed_business_segment(shop)[source]

Returns the installed business segment

shuup.admin.modules.sample_data.manager.get_installed_products(shop)[source]

Returns the installed products samples list

shuup.admin.modules.sample_data.manager.get_installed_categories(shop)[source]

Returns the installed categories samples list

Returns the installed sample carousel

shuup.admin.modules.sample_data.manager.clear_installed_samples(shop)[source]

Clears all the samples values from the configuration

shuup.admin.modules.sample_data.manager.save_business_segment(shop, business_segment)[source]

Save the business segment identifier

shuup.admin.modules.sample_data.manager.save_products(shop, products_pk)[source]

Save a list of PK as a list of sample products for a shop

shuup.admin.modules.sample_data.manager.save_categories(shop, categories_pk)[source]

Save a list of PK as a list of sample categories for a shop

Save the PK of the sample carousel

shuup.admin.modules.sample_data.manager.has_installed_samples(shop)[source]

Returns whether there is some sample data installed

shuup.admin.modules.sample_data.views module

class shuup.admin.modules.sample_data.views.ConsolidateSampleObjectsView(**kwargs)[source]

Bases: django.views.generic.edit.FormView

This view will consolidate all the samples selected by user. All samples which are not in the form will be deleted.

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

form_class

alias of ConsolidateObjectsForm

template_name = 'shuup/admin/sample_data/consolidate_samples.jinja'
form_valid(form)[source]
get_form_kwargs()[source]
get_context_data(**kwargs)[source]
class shuup.admin.modules.sample_data.views.SampleObjectsWizardPane(request, object=None)[source]

Bases: shuup.admin.views.wizard.WizardPane

identifier = 'sample'
icon = 'shuup_admin/img/configure.png'
title = <django.utils.functional.lazy.<locals>.__proxy__ object>
text = <django.utils.functional.lazy.<locals>.__proxy__ object>
visible()[source]
get_form_defs()[source]
form_valid(form)[source]

Module contents

class shuup.admin.modules.sample_data.SampleDataAdminModule[source]

Bases: shuup.admin.base.AdminModule

get_urls()[source]
get_menu_entries(request)[source]
get_required_permissions()[source]
get_notifications(request)[source]

Injects a message to the user and also a notification