Browse files

Added a note on the behaviour of the routing system

  • Loading branch information...
1 parent 718ef4d commit 08bf538fb4d173fffcda1397e8485b069c03e718 @mitsuhiko mitsuhiko committed Aug 26, 2011
Showing with 16 additions and 0 deletions.
  1. +16 −0 docs/design.rst
@@ -79,6 +79,22 @@ Furthermore this design makes it possible to use a factory function to
create the application which is very helpful for unittesting and similar
things (:ref:`app-factories`).
+The Routing System
+Flask uses the Werkzeug routing system which has was designed to
+automatically order routes by complexity. This means that you can declare
+routes in arbitrary order and they will still work as expected. This is a
+requirement if you want to properly implement decorator based routing
+since decorators could be fired in undefined order when the application is
+split into multiple modules.
+Another design decision with the Werkzeug routing system is that routes
+in Werkzeug try to ensure that there is that URLs are unique. Werkzeug
+will go quite far with that in that it will automatically redirect to a
+canonical URL if a route is ambiguous.
One Template Engine

0 comments on commit 08bf538

Please sign in to comment.