rattail-demo/rattail_demo/shopfoo/importing/model.py
Lance Edgar 852f9d4902 Add initial Shopfoo pattern feature
data models, import/export, web views etc.
2020-08-19 22:21:00 -05:00

29 lines
557 B
Python

# -*- coding: utf-8; -*-
"""
Shopfoo model importers
"""
from rattail_demo.db import model
from rattail.importing.exporters import ToCSV
from rattail.shopfoo.importing.model import ProductImporterMixin
class ToShopfoo(ToCSV):
pass
class ProductImporter(ProductImporterMixin, ToShopfoo):
"""
Shopfoo product data importer
"""
key = 'uuid'
simple_fields = [
'uuid',
'product_uuid',
'upc',
'description',
'price',
'enabled',
]
export_model_class = model.ShopfooProductExport