close Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 1 and Version 2 of UrlRouting


Ignore:
Timestamp:
Jun 25, 2008, 7:06:14 PM (16 years ago)
Author:
cmlenz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UrlRouting

    v1 v2  
    11= URL Routing and Generation =
    22
    3 TBW
     3The `diva.routing` module provides dispatching of requests to [RequestHandlers request handlers] based on the requested path, as well as the generation of concrete URLs based on the routing.
     4
     5== Routing Configuration File ==
     6
     7While routes can of course be set up programatically, a simple configuration file format is also supported.
     8
     9A simple example:
     10
     11{{{
     12home:           /                       -> geddit.controllers:index
     13feed:           /feed                   -> geddit.controllers:feed
     14info:           /info/{id}              -> geddit.controllers:info
     15comment:        /info/{id}/comment      -> geddit.controllers:comment
     16submit:         /submit                 -> geddit.controllers:submit
     17
     18media:          /media/{filename:.+}    -> diva.static:directory
     19    path = "%(here)s/static/"
     20}}}
     21