documentation/content/developer/howtos/website/routing-basic
Antoine Vandevenne (anv) ebc3e70d0f [APOCALYPSE] Merge all documentations and add a new homemade theme
Co-authored-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Elisabeth Dickinson (edi) <edi@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2021-01-28 19:05:48 +01:00

20 lines
644 B
Plaintext

# HG changeset patch
# Parent 0795247fa6cbb63238941f3dd26a8b6144fa71ee
# Parent f66ff336f8ed20e022660bd74a43af1b44a1f275
diff --git a/academy/controllers.py b/academy/controllers.py
--- a/academy/controllers.py
+++ b/academy/controllers.py
@@ -9,6 +9,11 @@ class Academy(http.Controller):
'teachers': Teachers.search([])
})
+ @http.route('/academy/<name>/', auth='public', website=True)
+ def teacher(self, name):
+ return '<h1>{}</h1>'.format(name)
+
+
# @http.route('/academy/academy/objects/', auth='public')
# def list(self, **kw):
# return http.request.render('academy.listing', {