For my application, "model" = compute.py; "view" = a collection of webpages; "controller" = controller.py
MVC nuances with Flask and WTForms --
- The business logic workflow is captured exclusively in controller.py
- Upon form submission the workflow should return back to controller.py rather than linking to next page. The controller.py uses redirect(url_for()) to transition between pages.
- Form data extraction occurs in the controller; manipulations to the form data are made in compute.py (the model).
No comments:
Post a Comment