gooderp18绿色标准版
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

51 linhas
2.1KB

  1. #!C:\Green_GoodERP18_FSJ\python\python.exe
  2. import os
  3. import sys
  4. def main():
  5. from smart_chart.echart import get_version
  6. SMARTCHART = f'''
  7. _____ ___ ___ ___ _____ _____ _____ _ _ ___ _____ _____
  8. / ___/ / |/ | / | | _ \ |_ _| / ___| | | | | / | | _ \ |_ _|
  9. | |___ / /| /| | / /| | | |_| | | | | | | |_| | / /| | | |_| | | |
  10. \___ \ / / |__/ | | / / | | | _ / | | | | | _ | / / | | | _ / | |
  11. ___| | / / | | / / | | | | \ \ | | | |___ | | | | / / | | | | \ \ | |
  12. /_____/ /_/ |_| /_/ |_| |_| \_\ |_| \_____| |_| |_| /_/ |_| |_| \_\ |_|
  13. www.smartchart.cn version: {get_version()}
  14. '''
  15. """Run administrative tasks."""
  16. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'smart_chart.smartchart.settings')
  17. try:
  18. from django.core.management import execute_from_command_line
  19. except ImportError as exc:
  20. raise ImportError(
  21. "Couldn't import Django. Are you sure it's installed and "
  22. "available on your PYTHONPATH environment variable? Did you "
  23. "forget to activate a virtual environment?"
  24. ) from exc
  25. if len(sys.argv) == 1:
  26. sys.argv.extend(['runserver', '--insecure', '--noreload'])
  27. elif sys.argv[1] == 'wsgi':
  28. from waitress import serve
  29. from smart_chart.smartchart.wsgi import application
  30. try:
  31. from smart_chart.smartchart.settings import STATIC_ROOT
  32. except ImportError as e:
  33. from smart_chart.smartchart.settings import BASE_DIR
  34. print(f'Need Edit File\n{os.path.join(BASE_DIR, "config.ini")}\nTo set wsgi = True')
  35. return
  36. print(f'Run: smartchart collectstatic\nStatic: {STATIC_ROOT}')
  37. if len(sys.argv) > 2:
  38. host, port = sys.argv[2].split(':')
  39. else:
  40. host, port = '0.0.0.0', 8000
  41. serve(application, host=host, port=port)
  42. return
  43. print(SMARTCHART)
  44. execute_from_command_line(sys.argv)
  45. if __name__ == '__main__':
  46. main()
上海开阖软件有限公司 沪ICP备12045867号-1