Add initial Shopfoo pattern feature
data models, import/export, web views etc.
This commit is contained in:
parent
a7656928f5
commit
852f9d4902
19 changed files with 515 additions and 1 deletions
28
rattail_demo/shopfoo/importing/model.py
Normal file
28
rattail_demo/shopfoo/importing/model.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
# -*- 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
|
Loading…
Add table
Add a link
Reference in a new issue