Directory structure of Flask large programs

A small web program can write the code in a file. Flask does not enforce a directory structure like Django, but when the program reaches a certain scale, a reasonable directory structure organization makes development and maintenance more convenient. The following is a Flask's directory structure:

|-flasky
  |-app/
    |-templates/
    |-static/
    |-main/
      |-__init__.py
      |-errors.py
      |-forms.py
      |-views.py
    |-__init__.py
    |-email.py
    |-models.py
  |-migrations/
  |-tests/
    |-__init__.py
    |-test*.py
  |-venv/
  |-requirements.txt
  |-config.py
  |-flasky.py

  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325109540&siteId=291194637