diff options
| author | Christophe Simonis <chs@odoo.com> | 2014-09-05 15:28:22 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2014-09-05 15:28:22 +0200 |
| commit | 31bf30d2d0eb78baaa36360b99fe58bf7cd4c9e7 (patch) | |
| tree | d7be61ecd6bb4c8b5552e39b03e2a64eebbbf323 /doc/howtos/website/routing-basic | |
| parent | afba9e8817c458640ae446ac7aaaab79be4fe1e9 (diff) | |
| parent | ed1c173971968eaa96693cb4e1547efa6e6c34e0 (diff) | |
[MERGE] forward port of branch 8.0 up to ed1c173
Diffstat (limited to 'doc/howtos/website/routing-basic')
| -rw-r--r-- | doc/howtos/website/routing-basic | 14 |
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) ++ |
