web/views/basetemplates.py
changeset 8697 574bb05e40a4
parent 8485 8de41063d629
child 8706 e362054d9701
--- a/web/views/basetemplates.py	Thu Feb 14 16:01:24 2013 +0100
+++ b/web/views/basetemplates.py	Thu Feb 14 16:45:07 2013 +0100
@@ -92,7 +92,7 @@
         return 1
     if view.binary:
         return 0
-    if req.form.has_key('__notemplate'):
+    if '__notemplate' in req.form:
         return 0
     return view.templatable
 
@@ -105,7 +105,8 @@
     def call(self, view):
         view.set_request_content_type()
         view.set_stream()
-        if (self._cw.form.has_key('__notemplate') and view.templatable
+        if (('__notemplate' in self._cw.form)
+            and view.templatable
             and view.content_type == self._cw.html_content_type()):
             view.w(self._cw.document_surrounding_div())
             view.render()