view.py
branchstable
changeset 4244 2c3de1953d00
parent 4212 ab6573088b4a
child 4252 6c4f109c2b03
child 4456 e0ee73794898
--- a/view.py	Thu Jan 14 11:37:08 2010 +0100
+++ b/view.py	Fri Jan 15 09:05:40 2010 +0100
@@ -10,6 +10,7 @@
 _ = unicode
 
 from cStringIO import StringIO
+from warnings import warn
 
 from simplejson import dumps
 
@@ -99,12 +100,24 @@
     registered = require_group_compat(AppObject.registered)
 
     templatable = True
-    need_navigation = True
     # content_type = 'application/xhtml+xml' # text/xhtml'
     binary = False
     add_to_breadcrumbs = True
     category = 'view'
 
+    @property
+    @deprecated('[3.6] need_navigation is deprecated, use .paginable')
+    def need_navigation(self):
+        return True
+
+    @property
+    def paginable(self):
+        if not isinstance(self.__class__.need_navigation, property):
+            warn('[3.6] %s.need_navigation is deprecated, use .paginable'
+                 % self.__class__, DeprecationWarninig)
+            return self.need_navigation
+        return True
+
     def __init__(self, req=None, rset=None, **kwargs):
         super(View, self).__init__(req, rset, **kwargs)
         self.w = None