설명 없음
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.

admin.py 616B

12345678910111213141516171819202122
  1. #-*- coding: utf-8 -*-
  2. import sys
  3. import os, os.path
  4. sys.path.append(os.path.dirname(os.getcwd()+'/..'))
  5. import loader
  6. def generate_dyncode(model_file, translator):
  7. from lodel.editorial_model.model import EditorialModel
  8. from lodel.leapi import lefactory
  9. model = EditorialModel.load(translator, filename = model_file)
  10. dyncode = lefactory.dyncode_from_em(model)
  11. return dyncode
  12. def refresh_dyncode(model_file, translator, output_filename):
  13. dyncode = generate_dyncode(model_file, translator)
  14. with open(output_filename, 'w+') as out_fd:
  15. out_fd.write(dyncode)
  16. out_fd.close()