[ADD] doc: new documentation, with training tutorials, and new scaffolding
[odoo/odoo.git] / doc / howtos / website / template
1 # HG changeset patch
2 # Parent d5ad2ad84a5db0668e4e08fefb6e3f628c2e14d1
3 diff -r d5ad2ad84a5d -r 3e800beb7db0 academy/__openerp__.py
4 --- a/academy/__openerp__.py    Mon Aug 11 16:12:38 2014 +0200
5 +++ b/academy/__openerp__.py    Mon Aug 11 16:36:15 2014 +0200
6 @@ -6,4 +6,8 @@
7      """,
8      # Which modules must be installed for this one to work
9      'depends': ['base'],
10 +    # data files which are always installed
11 +    'data': [
12 +        'templates.xml',
13 +    ],
14  }
15 diff -r d5ad2ad84a5d -r 3e800beb7db0 academy/controllers.py
16 --- a/academy/controllers.py    Mon Aug 11 16:12:38 2014 +0200
17 +++ b/academy/controllers.py    Mon Aug 11 16:36:15 2014 +0200
18 @@ -4,5 +4,7 @@ from openerp import http
19  class Academy(http.Controller):
20      @http.route('/academy/', auth='public')
21      def index(self):
22 -        return "Hello, world!"
23 +        return http.request.render('academy.index', {
24 +            'teachers': ["Diana Padilla", "Jody Caroll", "Lester Vaughn"],
25 +        })
26  
27 diff -r d5ad2ad84a5d -r 3e800beb7db0 academy/templates.xml
28 --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
29 +++ b/academy/templates.xml     Mon Aug 11 16:36:15 2014 +0200
30 @@ -0,0 +1,8 @@
31 +<openerp><data>
32 +  <template id="index">
33 +    <title>Academy</title>
34 +    <t t-foreach="teachers" t-as="teacher">
35 +        <p><t t-esc="teacher"/></p>
36 +    </t>
37 +  </template>
38 +</data></openerp>
39 \ No newline at end of file