This PR makes our Flask application use Flask's blueprint facility.
This helps us separate the concerns of different parts of our application. Right now, that isn't too significant an issue, but if we start adding more routes or API resources, it'll be nice to keep these things separate from each other and the logic behind blueprints helps to achieve this. It will also make testing easier, as it allows us to more cleanly handle production configurations versus test configurations by completely removing the notion of a global flask application.
Major changes:
./routes.py :arrow_right: ./core/routes.py
./resources.py :arrow_right: ./auth/resources.py
./__init__.py now instantiations cmr via a factory method, create_app()
This PR makes our Flask application use Flask's blueprint facility.
This helps us separate the concerns of different parts of our application. Right now, that isn't too significant an issue, but if we start adding more routes or API resources, it'll be nice to keep these things separate from each other and the logic behind blueprints helps to achieve this. It will also make testing easier, as it allows us to more cleanly handle production configurations versus test configurations by completely removing the notion of a global flask application.
Major changes:
./routes.py
:arrow_right:./core/routes.py
./resources.py
:arrow_right:./auth/resources.py
./__init__.py
now instantiationscmr
via a factory method,create_app()