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
46
rattail_demo/commands.py
Normal file
46
rattail_demo/commands.py
Normal file
|
@ -0,0 +1,46 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
"""
|
||||
Rattail Demo Commands
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
from rattail import commands
|
||||
from rattail_demo import __version__
|
||||
|
||||
|
||||
def main(*args):
|
||||
"""
|
||||
Main entry point for Rattail Demo command system
|
||||
"""
|
||||
args = list(args or sys.argv[1:])
|
||||
cmd = Command()
|
||||
cmd.run(*args)
|
||||
|
||||
|
||||
class Command(commands.Command):
|
||||
"""
|
||||
Main command for Rattail Demo
|
||||
"""
|
||||
name = 'rattail-demo'
|
||||
version = __version__
|
||||
description = "Rattail Demo (custom Rattail system)"
|
||||
long_description = ""
|
||||
|
||||
|
||||
class ExportShopfoo(commands.ExportFileSubcommand):
|
||||
"""
|
||||
Export data to the Shopfoo system
|
||||
"""
|
||||
name = 'export-shopfoo'
|
||||
description = __doc__.strip()
|
||||
handler_spec = 'rattail_demo.shopfoo.importing.rattail:FromRattailToShopfoo'
|
||||
|
||||
|
||||
class ImportSelf(commands.ImportSubcommand):
|
||||
"""
|
||||
Update "cascading" Rattail data based on "core" Rattail data
|
||||
"""
|
||||
name = 'import-self'
|
||||
description = __doc__.strip()
|
||||
handler_spec = 'rattail_demo.importing.local:FromRattailDemoToSelf'
|
Loading…
Add table
Add a link
Reference in a new issue