2017-03-14 12:56:57 +00:00
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
import uuid
|
|
|
|
|
|
|
|
import transaction
|
2019-07-12 07:06:38 +00:00
|
|
|
from pyramid.paster import get_appsettings, setup_logging
|
2017-03-14 12:56:57 +00:00
|
|
|
from pyramid.scripts.common import parse_vars
|
|
|
|
|
|
|
|
from barker.models import (
|
|
|
|
Customer,
|
|
|
|
DbSetting,
|
2019-06-13 19:02:34 +00:00
|
|
|
Permission,
|
|
|
|
User,
|
2017-03-14 12:56:57 +00:00
|
|
|
get_engine,
|
|
|
|
get_session_factory,
|
|
|
|
get_tm_session,
|
2019-06-13 19:02:34 +00:00
|
|
|
SettleOption,
|
2019-07-12 07:06:38 +00:00
|
|
|
Role,
|
|
|
|
Section,
|
|
|
|
ModifierCategory,
|
|
|
|
)
|
2017-03-14 12:56:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
def usage(argv):
|
|
|
|
cmd = os.path.basename(argv[0])
|
2020-06-14 13:13:10 +00:00
|
|
|
print("usage: %s <config_uri> [var=value]\n" '(example: "%s development.ini")' % (cmd, cmd))
|
2017-03-14 12:56:57 +00:00
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
|
|
|
|
def main(argv=sys.argv):
|
|
|
|
with transaction.manager:
|
2019-08-19 10:28:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
|