documentation/content/developer/howtos/website/routing-converter
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

21 lines
716 B
Plaintext

# HG changeset patch
# Parent e9d9740fa1852c80541c6b5b94280c8ec74cc4bb
# Parent cf501446e2f8d7a059ef7bd16866ed03c8f2a04f
diff --git a/academy/controllers.py b/academy/controllers.py
--- a/academy/controllers.py
+++ b/academy/controllers.py
@@ -9,9 +9,9 @@ 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/<int:id>/', auth='public', website=True)
+ def teacher(self, id):
+ return '<h1>{} ({})</h1>'.format(id, type(id).__name__)
# @http.route('/academy/academy/objects/', auth='public')