No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

refreshdyn.py 537B

123456789101112131415161718
  1. # -*- coding: utf-8 -*-
  2. import sys
  3. from EditorialModel.model import Model
  4. from leapi.lefactory import LeFactory
  5. from EditorialModel.backend.json_backend import EmBackendJson
  6. from DataSource.MySQL.leapidatasource import LeDataSourceSQL
  7. OUTPUT = 'leapi/dyn.py' if len(sys.argv) == 1 else sys.argv[1]
  8. EMJSON = 'EditorialModel/test/me.json' if len(sys.argv) < 3 else sys.argv[2]
  9. em = Model(EmBackendJson(EMJSON))
  10. fact = LeFactory(OUTPUT)
  11. fact.create_pyfile(em, LeDataSourceSQL, {})
  12. print(fact.generate_python(em, LeDataSourceSQL, {}))