2020-08-19 22:21:00 -05:00
|
|
|
# -*- 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
|
2021-01-20 21:54:52 -06:00
|
|
|
from rattail_woocommerce.importing.versions import WooVersionMixin
|
2020-08-19 22:21:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
class FromRattailDemoToRattailDemoVersions(base.FromRattailToRattailVersions,
|
2021-01-20 21:54:52 -06:00
|
|
|
CoreposVersionMixin,
|
|
|
|
WooVersionMixin):
|
2020-08-19 22:21:00 -05:00
|
|
|
"""
|
|
|
|
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)
|
2021-01-20 21:54:52 -06:00
|
|
|
importers = self.add_woo_importers(importers)
|
2020-08-19 22:21:00 -05:00
|
|
|
importers['ShopfooProduct'] = ShopfooProductImporter
|
|
|
|
return importers
|
|
|
|
|
|
|
|
|
|
|
|
class ShopfooProductImporter(base.VersionImporter):
|
|
|
|
host_model_class = model.ShopfooProduct
|