[IMP] models: move prefetching of records back to method _prefetch_field
[odoo/odoo.git] / doc / howto / howto_website / url-pattern
1 # HG changeset patch
2 # Parent b82b9012736b3d8e0bc7f6325f47cb2fb86f475d
3
4 diff --git a/controllers/academy.py b/controllers/academy.py
5 --- a/controllers/academy.py
6 +++ b/controllers/academy.py
7 @@ -15,7 +15,7 @@ class academy(main.Home):
8      @http.route('/', auth='none')
9      def index(self):
10          tas = [
11 -            '<li><a href="/tas/?id=%d">%s</a></li>' % (i, ta['name'])
12 +            '<li><a href="/tas/%d/">%s</a></li>' % (i, ta['name'])
13              for i, ta in enumerate(teaching_assistants)
14          ]
15  
16 @@ -32,7 +32,7 @@ class academy(main.Home):
17          'tas': '\n'.join(tas)
18      }
19  
20 -    @http.route('/tas', auth='none')
21 +    @http.route('/tas/<int:id>/', auth='none')
22      def ta(self, id):
23          return """<!doctype html>
24  <html>
25 @@ -44,4 +44,4 @@ class academy(main.Home):
26          <h1>%(name)s</h1>
27      </body>
28  </html>
29 -""" % teaching_assistants[int(id)]
30 +""" % teaching_assistants[id]