14 lines
605 B
Django/Jinja
14 lines
605 B
Django/Jinja
# -*- coding: utf-8 -*-
|
|
from openerp import http
|
|
from openerp.addons.web.controllers import main
|
|
|
|
class {{ config.controller }}(main.Home):
|
|
@http.route('/{{ config.module }}/{{ config.controller }}', auth='public')
|
|
def index(self):
|
|
return "Hello, world!"
|
|
{% if config.has_model %}
|
|
@http.route('/{{ config.module }}/{{ config.controller }}/<model("{{ config.module }}.{{ config.controller }}"):{{ config.controller }}>'], type='http', auth='public')
|
|
def {{ config.controller }}(self, {{ config.controller }}, **kw):
|
|
return "Hello, %r!" % {{ config.controller }}
|
|
{% endif %}
|