--- 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