def admin(self, *args, **kw):
return super(Website, self).index(*args, **kw)
+ @http.route('/page/<path:path>', type='http', auth="db")
+ def index(self, **kw):
+ editable = bool(request.session._uid)
+ try:
+ request.session.check_security()
+ except http.SessionExpiredException:
+ editable = False
+ path = kw['path']
+ modules = request.registry.get("ir.ui.view").render(request.cr, 1, path, {})
+ if editable:
+ html = html.replace('<!--editable-->', get_html_head())
+ return html
+
# vim:expandtab:tabstop=4:softtabstop=4:shiftwidth=4:
<field name="arch" type="xml">
<html>
<body>
- <header>This is the header</header>
+ <header>This is the header <t t-esc="1+1"/></header>
<div class="main">This is the main content</div>
<nav>
<ul class="menu_list">
</field>
</record>
- <menuitem name="Test views"
- id="base.menu_test_view"
- parent="base.menu_config"
- sequence="80"/>
-
</data>
</openerp>