Why do I get ImportError: No module named http ?
When installing my module I get the following error:
File "/home/michael/workspace/openerp/server/openerp/addons/my_punchcard/controllers/my_controller.py, line 1, in <module> import openerp.http as http ImportError: No module named httpHere's line 1 of my code:
import openerp.http as http
so I tried this instead:
import openerp.addons.web.http as http
but then I get this error which says it can't find the route attribute.
File "/home/michael/workspace/openerp/server/openerp/addons/my_punchcard/controllers/my_controller.py", line 48, in my_punchcard @http.route('/web/my_page', type="http") AttributeError: 'module' object has no attribute 'route'
I am running Version 7.0-20131203-002409 on an Ubuntu server. I'm developing in Eclipse, which shows a red circle with a white X through it by the original Line 1. So I'm guessing Eclipse knows there's no http in openerp.
My code is like that from doc.openerp.com/trunk/web/web_controllers