# HG changeset patch
# User sylvain.thenault@logilab.fr
# Date 1234974130 -3600
# Node ID 7fd66f389ef738719b6ae62b235e226ccf43d047
# Parent 9cd49a910fce2494c8e3acef7351e728fd08c047
fix w/ template drop
diff -r 9cd49a910fce -r 7fd66f389ef7 cwconfig.py
--- a/cwconfig.py Wed Feb 18 17:12:52 2009 +0100
+++ b/cwconfig.py Wed Feb 18 17:22:10 2009 +0100
@@ -59,7 +59,7 @@
# XXX generate this according to the configuration (repository/all-in-one/web)
VREGOPTIONS = []
for registry in ('etypes', 'hooks', 'controllers', 'actions', 'components',
- 'views', 'templates', 'boxes', 'contentnavigation', 'urlrewriting',
+ 'views', 'boxes', 'contentnavigation', 'urlrewriting',
'facets'):
VREGOPTIONS.append(('disable-%s'%registry,
{'type' : 'csv', 'default': (),
diff -r 9cd49a910fce -r 7fd66f389ef7 view.py
--- a/view.py Wed Feb 18 17:12:52 2009 +0100
+++ b/view.py Wed Feb 18 17:22:10 2009 +0100
@@ -218,13 +218,13 @@
view = self.vreg.select_view(__fallback_vid, self.req, rset, **kwargs)
return view.dispatch(**kwargs)
- # XXX Template bw compat
- template = obsolete('.template is deprecated, use .view')(view)
-
def wview(self, __vid, rset, __fallback_vid=None, **kwargs):
"""shortcut to self.view method automatically passing self.w as argument
"""
self.view(__vid, rset, __fallback_vid, w=self.w, **kwargs)
+
+ # XXX Template bw compat
+ template = obsolete('.template is deprecated, use .view')(wview)
def whead(self, data):
self.req.html_headers.write(data)
diff -r 9cd49a910fce -r 7fd66f389ef7 web/views/basetemplates.py
--- a/web/views/basetemplates.py Wed Feb 18 17:12:52 2009 +0100
+++ b/web/views/basetemplates.py Wed Feb 18 17:22:10 2009 +0100
@@ -38,7 +38,7 @@
w(NOINDEX)
w(NOFOLLOW)
w(u'\n'.join(additional_headers) + u'\n')
- self.view('htmlheader', rset=self.rset)
+ self.wview('htmlheader', rset=self.rset)
w(u'
%s\n' % html_escape(page_title))
@@ -47,7 +47,7 @@
title = 'log in'
def content(self, w):
- self.view('logform', rset=self.rset, id='loginBox', klass='')
+ self.wview('logform', rset=self.rset, id='loginBox', klass='')
class LoggedOutTemplate(LogInOutTemplate):
@@ -128,7 +128,7 @@
self.set_request_content_type()
content_type = self.content_type
self.template_header(content_type, view)
- self.view('page-content', view=view, rset=rset)
+ self.wview('page-content', view=view, rset=rset)
if with_templates:
self.template_footer(view)
@@ -161,14 +161,14 @@
w(u'\n'
% (content_type, self.req.encoding))
w(u'\n'.join(additional_headers) + u'\n')
- self.view('htmlheader', rset=self.rset)
+ self.wview('htmlheader', rset=self.rset)
if page_title:
w(u'%s\n' % html_escape(page_title))
def template_body_header(self, view):
w = self.w
w(u'\n')
- self.view('header', rset=self.rset, view=view)
+ self.wview('header', rset=self.rset, view=view)
w(u'\n')
self.nav_column(view, 'left')
w(u'\n')
@@ -185,7 +185,7 @@
self.w(u' | \n')
self.nav_column(view, 'right')
self.w(u'
\n')
- self.view('footer', rset=self.rset)
+ self.wview('footer', rset=self.rset)
self.w(u'')
def nav_column(self, view, context):
@@ -199,10 +199,10 @@
def content_header(self, view=None):
"""by default, display informal messages in content header"""
- self.view('contentheader', rset=self.rset, view=view)
+ self.wview('contentheader', rset=self.rset, view=view)
def content_footer(self, view=None):
- self.view('contentfooter', rset=self.rset, view=view)
+ self.wview('contentfooter', rset=self.rset, view=view)
class PageContentTemplate(TheMainTemplate):
@@ -266,7 +266,7 @@
w(u'\n'
% (content_type, self.req.encoding))
w(u'\n'.join(additional_headers))
- self.view('htmlheader', rset=self.rset)
+ self.wview('htmlheader', rset=self.rset)
w(u'%s\n' % html_escape(page_title))
self.w(u'\n')
@@ -287,7 +287,7 @@
whead(u'\n'
% (content_type, self.req.encoding))
whead(u'\n'.join(additional_headers) + u'\n')
- self.view('htmlheader', rset=self.rset)
+ self.wview('htmlheader', rset=self.rset)
w = self.w
w(u'%s\n' % html_escape(page_title))
w(u'\n')
@@ -403,8 +403,8 @@
self.w(u'')
self.w(u' | \n')
self.w(u'\n')
- self.view('logform', rset=self.rset, id='popupLoginBox', klass='hidden',
- title=False, message=False)
+ self.wview('logform', rset=self.rset, id='popupLoginBox', klass='hidden',
+ title=False, message=False)
def state_header(self):
state = self.req.search_state