summaryrefslogtreecommitdiff
path: root/doc/howtos/website/routing-basic
diff options
context:
space:
mode:
Diffstat (limited to 'doc/howtos/website/routing-basic')
-rw-r--r--doc/howtos/website/routing-basic14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/howtos/website/routing-basic b/doc/howtos/website/routing-basic
new file mode 100644
index 00000000000..15c19c632a5
--- /dev/null
+++ b/doc/howtos/website/routing-basic
@@ -0,0 +1,14 @@
+# HG changeset patch
+# Parent 0795247fa6cbb63238941f3dd26a8b6144fa71ee
+diff -r 0795247fa6cb -r e9d9740fa185 academy/controllers.py
+--- a/academy/controllers.py Tue Aug 12 11:27:14 2014 +0200
++++ b/academy/controllers.py Tue Aug 12 16:51:29 2014 +0200
+@@ -8,3 +8,8 @@ class Academy(http.Controller):
+ return http.request.render('academy.index', {
+ 'teachers': Teachers.search([]),
+ })
++
++ @http.route('/academy/<name>/', auth='public', website=True)
++ def teacher(self, name):
++ return '<h1>{}</h1>'.format(name)
++