2018-01-16 06:58:15 +01:00
|
|
|
# HG changeset patch
|
|
|
|
# Parent d5ad2ad84a5db0668e4e08fefb6e3f628c2e14d1
|
|
|
|
# Parent e65c9826721cb2421131399bc9223e03b482d38f
|
|
|
|
|
|
|
|
diff --git a/academy/controllers.py b/academy/controllers.py
|
|
|
|
--- a/academy/controllers.py
|
|
|
|
+++ b/academy/controllers.py
|
2018-03-14 10:18:18 +01:00
|
|
|
@@ -4,7 +4,9 @@ from flectra import http
|
2018-01-16 06:58:15 +01:00
|
|
|
class Academy(http.Controller):
|
|
|
|
@http.route('/academy/academy/', auth='public')
|
|
|
|
def index(self, **kw):
|
|
|
|
- return "Hello, world"
|
|
|
|
+ return http.request.render('academy.index', {
|
|
|
|
+ 'teachers': ["Diana Padilla", "Jody Caroll", "Lester Vaughn"],
|
|
|
|
+ })
|
|
|
|
|
|
|
|
# @http.route('/academy/academy/objects/', auth='public')
|
|
|
|
# def list(self, **kw):
|
|
|
|
diff --git a/academy/templates.xml b/academy/templates.xml
|
|
|
|
--- a/academy/templates.xml
|
|
|
|
+++ b/academy/templates.xml
|
|
|
|
@@ -1,14 +1,11 @@
|
2018-03-14 10:18:18 +01:00
|
|
|
<flectra>
|
2018-01-16 06:58:15 +01:00
|
|
|
|
|
|
|
- <!-- <template id="listing"> -->
|
|
|
|
- <!-- <ul> -->
|
|
|
|
- <!-- <li t-foreach="objects" t-as="object"> -->
|
|
|
|
- <!-- <a t-attf-href="#{ root }/objects/#{ object.id }"> -->
|
|
|
|
- <!-- <t t-esc="object.display_name"/> -->
|
|
|
|
- <!-- </a> -->
|
|
|
|
- <!-- </li> -->
|
|
|
|
- <!-- </ul> -->
|
|
|
|
- <!-- </template> -->
|
|
|
|
+ <template id="index">
|
|
|
|
+ <title>Academy</title>
|
|
|
|
+ <t t-foreach="teachers" t-as="teacher">
|
|
|
|
+ <p><t t-esc="teacher"/></p>
|
|
|
|
+ </t>
|
|
|
|
+ </template>
|
|
|
|
<!-- <template id="object"> -->
|
|
|
|
<!-- <h1><t t-esc="object.display_name"/></h1> -->
|
|
|
|
<!-- <dl> -->
|