shuup.core.management.commands package

Submodules

shuup.core.management.commands.compute_bought_with_relations module

class shuup.core.management.commands.compute_bought_with_relations.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: django.core.management.base.BaseCommand

handle(*args, **options)[source]

shuup.core.management.commands.makemessages module

Patched version of Django’s Makemessages that works with Jinja2.

Works by monkey patching django.utils.translation.trans_real.templatize with our version.

class shuup.core.management.commands.makemessages.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: django.core.management.commands.makemessages.Command

add_arguments(parser)[source]
handle(*args, **options)[source]
build_potfiles()[source]

Build PO Template files and return paths to them.

Extends base classes version of this method by adding the “Remove POT-Creation-Date” feature.

write_po_file(potfile, locale)[source]

Writo PO file of given locale to disk.

Extends base classes version of this method by adding a feature to not change those PO files at all that have only the “POT-Creation-Date” header changed.

shuup.core.management.commands.makemessages.jinja_messages_to_python(src, origin=None, **kwargs)[source]

Convert Jinja2 file to Python preserving only messages.

shuup.core.management.commands.makemessages.extract_jinja(contents, origin=None)[source]

shuup.core.management.commands.shuup_extract_products_shortdescription module

Extract products short description from the current description.

class shuup.core.management.commands.shuup_extract_products_shortdescription.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: django.core.management.base.BaseCommand

help = 'Extract products short description from the current description.'
handle(*args, **options)[source]

shuup.core.management.commands.shuup_fix_order_status_identifiers module

class shuup.core.management.commands.shuup_fix_order_status_identifiers.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: django.core.management.base.BaseCommand

handle(*args, **options)[source]

shuup.core.management.commands.shuup_init module

shuup.core.management.commands.shuup_init.schema(model, identifier, **info)[source]
class shuup.core.management.commands.shuup_init.Initializer[source]

Bases: object

schemata = [{'info': {'name': 'Default Shop', 'public_name': 'Default Shop', 'domain': 'localhost', 'status': <ShopStatus.ENABLED: 1>, 'maintenance_mode': False}, 'identifier': 'default', 'model': <class 'shuup.core.models.Shop'>}, {'info': {'name': 'Standard Product'}, 'identifier': 'default', 'model': <class 'shuup.core.models.ProductType'>}, {'info': {'name': 'Digital Product'}, 'identifier': 'digital', 'model': <class 'shuup.core.models.ProductType'>}, {'info': {'name': 'Default Supplier'}, 'identifier': 'default', 'model': <class 'shuup.core.models.Supplier'>}, {'info': {'name': 'Pieces', 'symbol': 'pcs'}, 'identifier': 'pcs', 'model': <class 'shuup.core.models.SalesUnit'>}, {'info': {'name': 'Retail Customers'}, 'identifier': 'default_person_customers', 'model': <class 'shuup.core.models.CustomerTaxGroup'>}, {'info': {'name': 'Company Customers'}, 'identifier': 'default_company_customers', 'model': <class 'shuup.core.models.CustomerTaxGroup'>}, {'info': {'decimal_places': 2}, 'identifier': 'USD', 'model': <class 'shuup.core.models.Currency'>}, {'info': {'decimal_places': 2}, 'identifier': 'EUR', 'model': <class 'shuup.core.models.Currency'>}, {'info': {'decimal_places': 2}, 'identifier': 'BRL', 'model': <class 'shuup.core.models.Currency'>}, {'info': {'decimal_places': 0}, 'identifier': 'JPY', 'model': <class 'shuup.core.models.Currency'>}, {'info': {'decimal_places': 2}, 'identifier': 'CNY', 'model': <class 'shuup.core.models.Currency'>}, {'info': {'decimal_places': 2}, 'identifier': 'GBP', 'model': <class 'shuup.core.models.Currency'>}, {'info': {'decimal_places': 2}, 'identifier': 'CAD', 'model': <class 'shuup.core.models.Currency'>}]
process_schema(schema)[source]
run()[source]
class shuup.core.management.commands.shuup_init.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: django.core.management.base.BaseCommand

leave_locale_alone = True
handle(*args, **options)[source]

shuup.core.management.commands.shuup_makemessages module

Makemessages helper for Shuup projects.

Runs Django’s makemessages for django and djangojs domains with sane defaults for Shuup projects (ignores and extensions).

class shuup.core.management.commands.shuup_makemessages.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: shuup.core.management.commands.makemessages.Command

help = "\nMakemessages helper for Shuup projects.\n\nRuns Django's makemessages for django and djangojs domains with sane\ndefaults for Shuup projects (ignores and extensions).\n"
add_arguments(parser)[source]
handle(*args, **options)[source]

shuup.core.management.commands.shuup_migrate_from_shoop module

class shuup.core.management.commands.shuup_migrate_from_shoop.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: django.core.management.base.BaseCommand

handle(*args, **options)[source]

shuup.core.management.commands.shuup_show_settings module

Show known Shuup settings and their values.

class shuup.core.management.commands.shuup_show_settings.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: django.core.management.base.BaseCommand

help = 'Show known Shuup settings and their values.'
add_arguments(parser)[source]
handle(*args, **options)[source]

Module contents