Changeset - 0e28a6ee2ba6
[Not reviewed]
0 5 0
Lance Edgar - 3 years ago 2021-12-05 17:24:54
lance@edbob.org
Some tweaks to expose CORE <-> Rattail import handlers in web app
5 files changed with 17 insertions and 2 deletions:
0 comments (0 inline, 0 general) First comment
rattail_corepos/corepos/importing/rattail.py
Show inline comments
 
@@ -43,8 +43,8 @@ class FromRattailToCore(importing.FromRattailHandler):
 
    """
 
    Rattail -> CORE-POS export handler
 
    """
 
    host_title = "Rattail"
 
    local_title = "CORE-POS"
 
    local_key = 'corepos_api'
 
    generic_local_title = "CORE Office (API)"
 
    direction = 'export'
 

	
 
    def get_importers(self):
rattail_corepos/corepos/lane/importing/op/office.py
Show inline comments
 
@@ -38,6 +38,8 @@ class FromCoreOfficeHandler(FromSQLAlchemyHandler):
 
    """
 
    Base class for import handlers which use CORE Office as the host.
 
    """
 
    host_key = 'corepos_db_office_op'
 
    generic_host_title = 'CORE Office (DB "op")'
 
    host_title = "CORE Office"
 

	
 
    def make_host_session(self):
 
@@ -50,6 +52,8 @@ class ToCoreLaneHandler(ToSQLAlchemyHandler):
 
    Base class for import handlers which target CORE Lane on the local side.
 
    """
 
    local_title = "CORE Lane"
 
    local_key = 'corepos_db_lane_op'
 
    generic_local_title = 'CORE Lane (DB "op")'
 

	
 
    def make_session(self):
 
        return CoreLaneSession()
rattail_corepos/importing/corepos/api.py
Show inline comments
 
@@ -48,6 +48,8 @@ class FromCOREPOSToRattail(importing.ToRattailHandler):
 
    """
 
    Import handler for data coming from a CORE POS API.
 
    """
 
    host_key = 'corepos_api'
 
    generic_host_title = "CORE Office (API)"
 
    host_title = "CORE-POS (API)"
 

	
 
    def get_importers(self):
rattail_corepos/importing/corepos/db.py
Show inline comments
 
@@ -38,6 +38,8 @@ class FromCOREPOSToRattail(importing.FromSQLAlchemyHandler, importing.ToRattailH
 
    """
 
    Import handler for data coming from a CORE POS database.
 
    """
 
    generic_host_title = 'CORE Office (DB "op")'
 
    host_key = 'corepos_db_office_op'
 
    corepos_dbkey = 'default'
 

	
 
    @property
setup.py
Show inline comments
 
@@ -123,6 +123,13 @@ setup(
 
            'import-corepos-db = rattail_corepos.commands:ImportCOREPOSDB',
 
        ],
 

	
 
        'rattail.importing': [
 
            'to_rattail.from_corepos_api = rattail_corepos.importing.corepos.api:FromCOREPOSToRattail',
 
            'to_rattail.from_corepos_db_office_op = rattail_corepos.importing.corepos.db:FromCOREPOSToRattail',
 
            'to_corepos_api.from_rattail = rattail_corepos.corepos.importing.rattail:FromRattailToCore',
 
            'to_corepos_db_lane_op.from_corepos_db_office_op = rattail_corepos.corepos.lane.importing.op.office:FromCoreOfficeToCoreLane',
 
        ],
 

	
 
        'trainwreck.commands': [
 
            'import-corepos = rattail_corepos.trainwreck.commands:ImportCore',
 
        ],
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now