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.
- Timestamp:
-
Jun 27, 2008, 12:00:19 PM (16 years ago)
- Author:
-
cmlenz
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v5
|
v6
|
|
21 | 21 | }}} |
22 | 22 | |
23 | | Every route is on a single line, with three different parts: the name of the route (optional), the path pattern, and the function that should handle requests matching that pattern. Additional indented lines can be provided to set default values for parameters that get passed on to the request handler. |
| 23 | Every route is on a single line, with three different parts: |
| 24 | * the '''name''' of the route (optional) |
| 25 | * the '''path''' pattern with variable parts enclosed in curly braces, and |
| 26 | * the '''target''' function that should handle requests matching that pattern (optional). |
| 27 | |
| 28 | Additional indented lines can be provided to set default values for parameters that get passed on to the request handler. The value of these parameters can be any Python expression. |
| 29 | |
| 30 | If 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. |
24 | 31 | |
25 | 32 | == API Documentation == |