controllers.py 699 B

123456789101112131415161718192021
  1. # -*- coding: utf-8 -*-
  2. # from odoo import http
  3. # class CatApp(http.Controller):
  4. # @http.route('/cat_app/cat_app', auth='public')
  5. # def index(self, **kw):
  6. # return "Hello, world"
  7. # @http.route('/cat_app/cat_app/objects', auth='public')
  8. # def list(self, **kw):
  9. # return http.request.render('cat_app.listing', {
  10. # 'root': '/cat_app/cat_app',
  11. # 'objects': http.request.env['cat_app.cat_app'].search([]),
  12. # })
  13. # @http.route('/cat_app/cat_app/objects/<model("cat_app.cat_app"):obj>', auth='public')
  14. # def object(self, obj, **kw):
  15. # return http.request.render('cat_app.object', {
  16. # 'object': obj
  17. # })