equal
deleted
inserted
replaced
90 view = kwargs.pop('view', None) |
90 view = kwargs.pop('view', None) |
91 if view is None: |
91 if view is None: |
92 return 1 |
92 return 1 |
93 if view.binary: |
93 if view.binary: |
94 return 0 |
94 return 0 |
95 if req.form.has_key('__notemplate'): |
95 if '__notemplate' in req.form: |
96 return 0 |
96 return 0 |
97 return view.templatable |
97 return view.templatable |
98 |
98 |
99 |
99 |
100 class NonTemplatableViewTemplate(MainTemplate): |
100 class NonTemplatableViewTemplate(MainTemplate): |
103 __select__ = ~templatable_view() |
103 __select__ = ~templatable_view() |
104 |
104 |
105 def call(self, view): |
105 def call(self, view): |
106 view.set_request_content_type() |
106 view.set_request_content_type() |
107 view.set_stream() |
107 view.set_stream() |
108 if (self._cw.form.has_key('__notemplate') and view.templatable |
108 if (('__notemplate' in self._cw.form) |
|
109 and view.templatable |
109 and view.content_type == self._cw.html_content_type()): |
110 and view.content_type == self._cw.html_content_type()): |
110 view.w(self._cw.document_surrounding_div()) |
111 view.w(self._cw.document_surrounding_div()) |
111 view.render() |
112 view.render() |
112 view.w(u'</div>') |
113 view.w(u'</div>') |
113 else: |
114 else: |