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

26 lines
821 B
Python

# -*- coding: utf-8; -*-
"""
Rattail Demo -> Rattail Demo "versions" data import
"""
from rattail_demo.db import model
from rattail.importing import versions as base
from rattail_corepos.importing.versions import CoreposVersionMixin
class FromRattailDemoToRattailDemoVersions(base.FromRattailToRattailVersions,
CoreposVersionMixin):
"""
Handler for Rattail Demo -> Rattail Demo "versions" data import
"""
def get_importers(self):
importers = super(FromRattailDemoToRattailDemoVersions, self).get_importers()
importers = self.add_corepos_importers(importers)
importers['ShopfooProduct'] = ShopfooProductImporter
return importers
class ShopfooProductImporter(base.VersionImporter):
host_model_class = model.ShopfooProduct