Packaging an application for reuse and extensibility
- Clayton Cafiero
- 2013-09-10 @ 13:15
What started out as a one-off project has become several projects with
different clients with the same (or very similar) application. A nice
problem to have, I guess, but it was unplanned. So now we're maintaining
what is essentially the same code in different projects (no fun). We're
also being asked to quote on new implementations and it does not make
sense to keep doing things this way.
I think the time has come to create a "base" application which can be
customized for each client. What do you suggest as a way of accomplishing
Application is modular and uses blueprints, but does not use class views.
Using Flask-SQLAlchemy, Flask-WTF, Flask-Mail, Flask-Assets, Flask-Script.
Project layout now is similar to other large Flask app layouts I've seen,
e.g., in http://flask.pocoo.org/docs/patterns/packages/
I suppose one could subclass the entire app and then customize from there.
Or I could set up "base" modules in a separate package and then import and
modify from there. Not sure how best to proceed.
Any suggestions would be most welcome.