Closed ET33 closed 4 years ago
Currently working on it, and it looks something like this:
pollex-flask
├── ... # other files (Dockerfile, Makefile, etc.)
├── run.py # execute this to run the application
├── app/
│ ├── __init__.py # contains the general setup for the application
│ └── views/ # this is where all the routes are defined
│ ├── auth.py
│ └── ...
│
├── config/ # contains all configuration files
│ ├── __init__.py
│ ├── default.py
│ ├── development.py
│ └── production.py
│
└── instance/ # directory for sensitive information
└── config.py
This is heavily based on this doc
Looks good and organized!
Really, looks good, indeed.
While studying, I found out that there are some common ways to structure the files and directories of a Flask project. Many tutorials end up with a main file that's big and looks messy as the project grows.
I suggest we use a more appropriate file structure to prevent this scenario.