# HG changeset patch # Parent 5a5145642f3604f09c5685d37beaddc497d3c850 diff --git a/__openerp__.py b/__openerp__.py --- a/__openerp__.py +++ b/__openerp__.py @@ -1,6 +1,7 @@ { 'name': "Academy", 'category': "Tools", + 'depends': ['website'], 'data': [ 'views/templates.xml', ] diff --git a/controllers.py b/controllers.py --- a/controllers.py +++ b/controllers.py @@ -10,18 +10,12 @@ teaching_assistants = [ ] class Home(main.Home): - @http.route('/', auth='none') + @http.route('/', auth='public') def index(self): - tas = [ - '
  • %s
  • ' % (i, ta['name']) - for i, ta in enumerate(teaching_assistants) - ] + return http.request.website.render('academy.index', { + 'tas': teaching_assistants, + }) - # how in fuck do I get a db here? - return "" % { - 'tas': '\n'.join(tas) - } - - @http.route('/tas//', auth='none') + @http.route('/tas//', auth='public', website=True) def ta(self, id): - return "" % teaching_assistants[id] + return http.request.website.render('academy.ta', teaching_assistants[id]) diff --git a/views/templates.xml b/views/templates.xml --- a/views/templates.xml +++ b/views/templates.xml @@ -17,7 +17,11 @@

    Teaching Assistants