summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorhuanghao <huang1hao@gmail.com>2015-04-21 13:58:05 +0800
committerhuanghao <huang1hao@gmail.com>2015-04-21 13:58:05 +0800
commitd5640ddb135b2a491ca30ec62e23c9d1b2ee833a (patch)
tree4312fb42b324095cb1999541c59df1c994617a84 /docs
parentf30dddcfebd782062b80fd78e32cfd6fd601dd86 (diff)
downloadroutes-d5640ddb135b2a491ca30ec62e23c9d1b2ee833a.tar.gz
Minor fix in docs
As the doc says "Route paths should always begin with a slash." Add a import statement in example code, since in that place it's the first time mention this class and user can't understand what "Route" class is.
Diffstat (limited to 'docs')
-rw-r--r--docs/setting_up.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/setting_up.rst b/docs/setting_up.rst
index 8d0f984..6039c79 100644
--- a/docs/setting_up.rst
+++ b/docs/setting_up.rst
@@ -84,7 +84,7 @@ backslashes. Without the R you'd have to double every backslash.
Another example::
- m.connect("archives/{year}/{month}/{day}", controller="archives",
+ m.connect("/archives/{year}/{month}/{day}", controller="archives",
action="view", year=2004,
requirements=dict(year=R"\d{2,4}", month=R"\d{1,2}"))
@@ -344,6 +344,7 @@ Adding routes from a nested application
gives the parent a list of routes to add to its mapper. These can be added
with the ``.extend`` method, optionally providing a path prefix::
+ from routes.route import Route
routes = [
Route("index", "/index.html", controller="home", action="index"),
]