common/view.py
branchtls-sprint
changeset 640 8e64f12be69c
parent 635 305da8d6aa2d
child 655 ca3c4992c7d1
--- a/common/view.py	Mon Feb 16 20:06:18 2009 +0100
+++ b/common/view.py	Mon Feb 16 20:51:24 2009 +0100
@@ -8,7 +8,6 @@
 __docformat__ = "restructuredtext en"
 
 from cStringIO import StringIO
-from warnings import warn
 
 from logilab.mtconverter import html_escape
 
@@ -297,18 +296,6 @@
     def create_url(self, etype, **kwargs):
         """ return the url of the entity creation form for a given entity type"""
         return self.req.build_url('add/%s'%etype, **kwargs)
-
-
-# concrete views base classes #################################################
-
-class EntityView(View):
-    """base class for views applying on an entity (i.e. uniform result set)
-    """
-    __registerer__ = accepts_registerer
-    __selectors__ = (implements('Any'),)
-    registered = accepts_compat(View.registered.im_func)
-
-    category = 'entityview'
     
     def field(self, label, value, row=True, show_label=True, w=None, tr=True):
         """ read-only field """
@@ -325,6 +312,19 @@
             w(u'</div>')
 
 
+# concrete views base classes #################################################
+
+class EntityView(View):
+    """base class for views applying on an entity (i.e. uniform result set)
+    """
+    # XXX deprecate
+    __registerer__ = accepts_registerer
+    __selectors__ = (implements('Any'),)
+    registered = accepts_compat(View.registered.im_func)
+
+    category = 'entityview'
+
+
 class StartupView(View):
     """base class for views which doesn't need a particular result set
     to be displayed (so they can always be displayed !)