Patterns for Flask (part2)ΒΆ
Certain things are common enough that the chances are high you will find them in most web applications. For example quite a lot of applications are using relational databases and user authentication. In that case, chances are they will open a database connection at the beginning of the request and get the information of the currently logged in user. At the end of the request, the database connection is closed again.
There are more user contributed snippets and patterns in the Flask Snippet Archives.
- 1. Template Inheritance
- 2. Message Flashing
- 3. AJAX with jQuery
- 4. Custom Error Pages
- 5. Lazily Loading Views
- 6. MongoKit in Flask
- 7. Adding a favicon
- 8. Streaming Contents
- 9. Deferred Request Callbacks
- 10. Adding HTTP Method Overrides
- 11. Request Content Checksums
- 12. Celery Based Background Tasks
- 13. Subclassing Flask