"Fossies" - the Fresh Open Source Software Archive

Member "flask-1.1.2/docs/patterns/index.rst" (3 Apr 2020, 1023 Bytes) of package /linux/www/flask-1.1.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the latest Fossies "Diffs" side-by-side code changes report for "index.rst": 1.1.1_vs_1.1.2.

Patterns for Flask

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.

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.

packages appfactories appdispatch apierrors urlprocessors distribute fabric sqlite3 sqlalchemy fileuploads caching viewdecorators wtforms templateinheritance flashing jquery errorpages lazyloading mongoengine favicon streaming deferredcallbacks methodoverrides requestchecksum celery subclassing singlepageapplications