shuup.default_importer.importers package

Submodules

shuup.default_importer.importers.contact module

class shuup.default_importer.importers.contact.AddressHandlerMeta(handler, model)[source]

Bases: shuup.importer.importing.meta.ImportMetaBase

aliases = {'name_ext': ['extension', 'ext']}
post_save_handlers = {'handle_row_address': ['city', 'country', 'postal code', 'region code', 'street']}
handle_row_address(fields, row_session)[source]
presave_hook(sess)[source]
class shuup.default_importer.importers.contact.PersonContactImporter(data, context)[source]

Bases: shuup.importer.importing.importing.DataImporter

identifier = 'contact_importer'
name = 'Contact Importer'
meta_base_class

alias of AddressHandlerMeta

model

alias of Contact

example_files = [<shuup.importer.importing.importing.ImporterExampleFile object>]
get_row_model(row)[source]
classmethod get_example_file_content(example_file, request)[source]
class shuup.default_importer.importers.contact.CompanyContactImporter(data, context)[source]

Bases: shuup.importer.importing.importing.DataImporter

identifier = 'company_importer'
name = 'Company Contact Importer'
meta_base_class

alias of AddressHandlerMeta

model

alias of Contact

example_files = [<shuup.importer.importing.importing.ImporterExampleFile object>]
get_row_model(row)[source]
classmethod get_example_file_content(example_file, request)[source]

shuup.default_importer.importers.product module

class shuup.default_importer.importers.product.ProductMetaBase(handler, model)[source]

Bases: shuup.importer.importing.meta.ImportMetaBase

aliases = {'type': ['product_type', 'producttype'], 'tax_class': ['tax_class_name'], 'name': ['title'], 'keywords': ['tags'], 'qty': ['quantity', 'stock_amount', 'stock_qty', 'stock_quantity', 'qty'], 'suppliers': ['supplier'], 'primary_category': ['category', 'main_category'], 'categories': ['extra_categories'], 'media': ['media', 'images'], 'image': ['image', 'main_image'], 'parent_sku': ['parent sku'], 'variation_value_1': ['variation value 1'], 'variation_value_2': ['variation value 2'], 'variation_value_3': ['variation value 3'], 'variation_value_4': ['variation value 4'], 'manufacturer': ['mfgr']}
fields_to_skip = ['ignore', 'shop_primary_image', 'primary_image']
post_save_handlers = {'handle_variations': ['parent_sku', 'variation_value_1', 'variation_value_2', 'variation_value_3', 'variation value 4'], 'handle_stocks': ['qty'], 'handle_images': ['image', 'media']}
handle_variations(fields, sess)[source]
handle_images(fields, sess)[source]

Handle images for product.

handle_stocks(fields, sess)[source]

Handle stocks for product.

If stock quantity has been given, expect that a supplier with stock management must be available.

presave_hook(sess)[source]
postsave_hook(sess)[source]
get_import_defaults()[source]

Get default values for import time.

class shuup.default_importer.importers.product.ProductImporter(data, context)[source]

Bases: shuup.importer.importing.importing.DataImporter

identifier = 'product_importer'
name = 'Product Importer'
meta_base_class

alias of ProductMetaBase

model

alias of Product

relation_field = 'product'
help_template = 'shuup/default_importers/product_help.jinja'
example_files = [<shuup.importer.importing.importing.ImporterExampleFile object>, <shuup.importer.importing.importing.ImporterExampleFile object>, <shuup.importer.importing.importing.ImporterExampleFile object>, <shuup.importer.importing.importing.ImporterExampleFile object>, <shuup.importer.importing.importing.ImporterExampleFile object>, <shuup.importer.importing.importing.ImporterExampleFile object>]
classmethod get_example_file_content(example_file, request)[source]
classmethod get_help_context_data(request)[source]

Module contents

class shuup.default_importer.importers.PersonContactImporter(data, context)[source]

Bases: shuup.importer.importing.importing.DataImporter

example_files = [<shuup.importer.importing.importing.ImporterExampleFile object>]
classmethod get_example_file_content(example_file, request)[source]
get_row_model(row)[source]
identifier = 'contact_importer'
meta_base_class

alias of AddressHandlerMeta

model

alias of Contact

name = 'Contact Importer'
class shuup.default_importer.importers.CompanyContactImporter(data, context)[source]

Bases: shuup.importer.importing.importing.DataImporter

example_files = [<shuup.importer.importing.importing.ImporterExampleFile object>]
classmethod get_example_file_content(example_file, request)[source]
get_row_model(row)[source]
identifier = 'company_importer'
meta_base_class

alias of AddressHandlerMeta

model

alias of Contact

name = 'Company Contact Importer'
class shuup.default_importer.importers.ProductImporter(data, context)[source]

Bases: shuup.importer.importing.importing.DataImporter

example_files = [<shuup.importer.importing.importing.ImporterExampleFile object>, <shuup.importer.importing.importing.ImporterExampleFile object>, <shuup.importer.importing.importing.ImporterExampleFile object>, <shuup.importer.importing.importing.ImporterExampleFile object>, <shuup.importer.importing.importing.ImporterExampleFile object>, <shuup.importer.importing.importing.ImporterExampleFile object>]
classmethod get_example_file_content(example_file, request)[source]
classmethod get_help_context_data(request)[source]
help_template = 'shuup/default_importers/product_help.jinja'
identifier = 'product_importer'
meta_base_class

alias of ProductMetaBase

model

alias of Product

name = 'Product Importer'
relation_field = 'product'