[Flask] A Question. app.py structure

Dave Pawson dave.pawson at gmail.com
Sun Jul 3 05:01:25 EDT 2022


I've 'played' with flask long enough to use it seriously.

Scenario: Book keeping, html user interface, mariadb mysql, flask + jinja code

I've working forms, database entry, read from db etc.

Now looking at structure?
It would appear that app.py (whatever you use) needs to contain or
import most of the code?

Are there any lessons to be learned for this structure and how it
interacts with templates/x.html

E.g. Show x.html to user, return x, test x, show templates/y.html
Should I be thinking of structuring app.py as any other app or...
It would seem app.py cannot (am I wrong) be a class,
just call up imported classes as needed?

Any advice in this area please.

TiA



-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.


More information about the Flask mailing list