equal
deleted
inserted
replaced
113 templatable = True |
113 templatable = True |
114 # content_type = 'application/xhtml+xml' # text/xhtml' |
114 # content_type = 'application/xhtml+xml' # text/xhtml' |
115 binary = False |
115 binary = False |
116 add_to_breadcrumbs = True |
116 add_to_breadcrumbs = True |
117 category = 'view' |
117 category = 'view' |
118 |
118 paginable = True |
119 @property |
|
120 @deprecated('[3.6] need_navigation is deprecated, use .paginable') |
|
121 def need_navigation(self): |
|
122 return True |
|
123 |
|
124 @property |
|
125 def paginable(self): |
|
126 if not isinstance(self.__class__.need_navigation, property): |
|
127 warn('[3.6] %s.need_navigation is deprecated, use .paginable' |
|
128 % self.__class__, DeprecationWarning) |
|
129 return self.need_navigation |
|
130 return True |
|
131 |
119 |
132 def __init__(self, req=None, rset=None, **kwargs): |
120 def __init__(self, req=None, rset=None, **kwargs): |
133 super(View, self).__init__(req, rset=rset, **kwargs) |
121 super(View, self).__init__(req, rset=rset, **kwargs) |
134 self.w = None |
122 self.w = None |
135 |
123 |
192 'req': self._cw, 'user': self._cw.user}) |
180 'req': self._cw, 'user': self._cw.user}) |
193 context.update(variables) |
181 context.update(variables) |
194 output = UStringIO() |
182 output = UStringIO() |
195 template.expand(context, output) |
183 template.expand(context, output) |
196 return output.getvalue() |
184 return output.getvalue() |
197 |
|
198 dispatch = deprecated('[3.4] .dispatch is deprecated, use .render')(render) |
|
199 |
185 |
200 # should default .call() method add a <div classs="section"> around each |
186 # should default .call() method add a <div classs="section"> around each |
201 # rset item |
187 # rset item |
202 add_div_section = True |
188 add_div_section = True |
203 |
189 |
281 |
267 |
282 def wview(self, __vid, rset=None, __fallback_vid=None, **kwargs): |
268 def wview(self, __vid, rset=None, __fallback_vid=None, **kwargs): |
283 """shortcut to self.view method automatically passing self.w as argument |
269 """shortcut to self.view method automatically passing self.w as argument |
284 """ |
270 """ |
285 self._cw.view(__vid, rset, __fallback_vid, w=self.w, **kwargs) |
271 self._cw.view(__vid, rset, __fallback_vid, w=self.w, **kwargs) |
286 |
|
287 # XXX Template bw compat |
|
288 template = deprecated('[3.4] .template is deprecated, use .view')(wview) |
|
289 |
272 |
290 def whead(self, data): |
273 def whead(self, data): |
291 self._cw.html_headers.write(data) |
274 self._cw.html_headers.write(data) |
292 |
275 |
293 def wdata(self, data): |
276 def wdata(self, data): |