diff options
| author | Xavier Morel <xmo@openerp.com> | 2014-01-20 14:13:10 +0100 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2014-05-19 08:23:13 +0200 |
| commit | c2d5bf1bc35660a2e5d56552e8ab5c9d2ca99a0c (patch) | |
| tree | 75548a4fa2f64e1f6ee0a51bd5f375c129e95cab /doc/howto/howto_website/basic-controller | |
| parent | 50c5a23dec02472bef9fd6fc163079cd1c999619 (diff) | |
[ADD] tutorial beginning
blocked at introducing qweb template, ir.qweb lives in the registry but nodb -> no database
with --db-filter there's a database in the session (kinda) but need to fetch it and manually get the corresponding registry...
Diffstat (limited to 'doc/howto/howto_website/basic-controller')
| -rw-r--r-- | doc/howto/howto_website/basic-controller | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/howto/howto_website/basic-controller b/doc/howto/howto_website/basic-controller new file mode 100644 index 00000000000..4415d9516bc --- /dev/null +++ b/doc/howto/howto_website/basic-controller @@ -0,0 +1,15 @@ +# HG changeset patch +# Parent 458a542843918f6899fe64bfe1cead00972ef68a + +diff --git a/controllers.py b/controllers.py +new file mode 100644 +--- /dev/null ++++ b/controllers.py +@@ -0,0 +1,7 @@ ++from openerp import http ++from openerp.addons.web.controllers import main ++ ++class Home(main.Home): ++ @http.route('/', auth='none') ++ def index(self): ++ return "Hello, world!" |
