Skip to content
Myr

Added a note on the behaviour of the routing system

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 718ef4d · Browse files · 1 file+16 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+16 added−0 removed

  • other:+16 added−0 removed

1 file+16 added−0 removed

modified:docs/design.rst+16 added
77 unmodified lines
78Furthermore this design makes it possible to use a factory function to79create the application which is very helpful for unittesting and similar80things (:ref:`app-factories`).8182The Routing System83------------------8485Flask uses the Werkzeug routing system which has was designed to86automatically order routes by complexity. This means that you can declare87routes in arbitrary order and they will still work as expected. This is a88requirement if you want to properly implement decorator based routing89since decorators could be fired in undefined order when the application is90split into multiple modules.9192Another design decision with the Werkzeug routing system is that routes93in Werkzeug try to ensure that there is that URLs are unique. Werkzeug94will go quite far with that in that it will automatically redirect to a95canonical URL if a route is ambiguous.969798One Template Engine99-------------------100101Flask decides on one template engine: Jinja2. Why doesn't Flask have a
90 unmodified lines