2010-04-18 13:35:40 +02:00
|
|
|
Patterns for Flask
|
|
|
|
|
==================
|
|
|
|
|
|
2019-09-23 08:19:40 -07:00
|
|
|
Certain features and interactions are common enough that you will find
|
|
|
|
|
them in most web applications. For example, many applications use a
|
|
|
|
|
relational database and user authentication. They will open a database
|
|
|
|
|
connection at the beginning of the request and get the information for
|
|
|
|
|
the logged in user. At the end of the request, the database connection
|
|
|
|
|
is closed.
|
2010-04-18 13:35:40 +02:00
|
|
|
|
2019-09-23 08:19:40 -07:00
|
|
|
These types of patterns may be a bit outside the scope of Flask itself,
|
|
|
|
|
but Flask makes it easy to implement them. Some common patterns are
|
|
|
|
|
collected in the following pages.
|
2010-05-03 12:22:27 +02:00
|
|
|
|
2010-04-18 13:35:40 +02:00
|
|
|
.. toctree::
|
|
|
|
|
:maxdepth: 2
|
|
|
|
|
|
|
|
|
|
packages
|
2010-05-27 17:55:57 +02:00
|
|
|
appfactories
|
2011-03-14 14:19:12 -04:00
|
|
|
appdispatch
|
2011-06-17 21:33:31 +02:00
|
|
|
urlprocessors
|
2010-04-18 13:35:40 +02:00
|
|
|
sqlite3
|
|
|
|
|
sqlalchemy
|
2010-04-24 20:36:06 +02:00
|
|
|
fileuploads
|
2010-04-25 18:55:01 +02:00
|
|
|
caching
|
|
|
|
|
viewdecorators
|
2010-04-19 02:22:59 +02:00
|
|
|
wtforms
|
2010-04-18 13:35:40 +02:00
|
|
|
templateinheritance
|
|
|
|
|
flashing
|
2022-06-11 13:44:46 -07:00
|
|
|
javascript
|
2010-05-26 14:49:01 +02:00
|
|
|
lazyloading
|
2018-10-24 20:06:44 -03:00
|
|
|
mongoengine
|
2011-01-12 10:35:44 +01:00
|
|
|
favicon
|
2011-07-27 22:34:18 +02:00
|
|
|
streaming
|
2011-09-18 12:50:56 +02:00
|
|
|
deferredcallbacks
|
2012-10-07 13:02:05 +02:00
|
|
|
methodoverrides
|
2012-10-07 15:46:21 +02:00
|
|
|
requestchecksum
|
2013-01-27 00:38:25 +00:00
|
|
|
celery
|
2016-06-02 14:14:56 -07:00
|
|
|
subclassing
|
2018-11-13 15:41:48 -06:00
|
|
|
singlepageapplications
|