web/views/basetemplates.py
changeset 11296 5153f6fd478e
parent 10666 7f6b5f023884
child 11373 68f0678fc543
--- a/web/views/basetemplates.py	Fri Jun 10 13:21:31 2016 +0200
+++ b/web/views/basetemplates.py	Wed Jun 01 15:17:09 2016 +0200
@@ -46,6 +46,8 @@
         w(u'</body>')
 
     def template_header(self, content_type, view=None, page_title='', additional_headers=()):
+        self._cw.html_headers.define_var('BASE_URL', self._cw.base_url())
+        self._cw.html_headers.define_var('DATA_URL', self._cw.datadir_url)
         w = self.whead
         # explictly close the <base> tag to avoid IE 6 bugs while browsing DOM
         w(u'<base href="%s"></base>' % xml_escape(self._cw.base_url()))