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 7 and Version 8 of UrlRouting


Ignore:
Timestamp:
Jul 15, 2008, 10:38:05 PM (16 years ago)
Author:
cmlenz
Comment:

More detailed notes on routes in routing config files

Legend:

Unmodified
Added
Removed
Modified
  • UrlRouting

    v7 v8  
    2626 * the '''target''' function that should handle requests matching that pattern (optional).
    2727
    28 Additional indented lines can be provided below any route to set default values for parameters that get passed on to the request handler. The value of these parameters can be any Python expression.
     28Variable parts in the path pattern consists of the variable name and an optional regular expression that needs to be matched, separated by a colon. If no regular expression is specified, the default is `[^/]+`, meaning that the part will match a single URL segment until the next slash.
     29
     30Additional indented lines can be provided below any route to set default values for parameters that get passed on to the request handler. The value of these parameters can be any Python expression. String values are interpolated, with the special `%(here)s` placeholder being substituted by the absolute path to the directory containing the routing configuration file.
    2931
    3032If no name is specified for a route, URLs for that route can not be generated by name, but only based on the function object. If no target is specified, the route is only used for generating links, not for dispatching requests.