fix syntax/import errors & adapted list base class
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 24 Jul 2009 12:43:41 +0200
changeset 2472 a459a6ab78d0
parent 2471 3e2b50ece726
child 2473 490f88fb99b6
child 2483 6e328fcc276c
fix syntax/import errors & adapted list base class
web/views/baseviews.py
--- a/web/views/baseviews.py	Fri Jul 24 12:13:51 2009 +0200
+++ b/web/views/baseviews.py	Fri Jul 24 12:43:41 2009 +0200
@@ -20,7 +20,7 @@
 from logilab.mtconverter import TransformError, xml_escape, xml_escape
 
 from cubicweb import NoSelectableObject
-from cubicweb.selectors import yes, empty_rset
+from cubicweb.selectors import yes, empty_rset, one_etype_rset
 from cubicweb.schema import display_name
 from cubicweb.view import EntityView, AnyRsetView, View
 from cubicweb.common.uilib import cut, printable_value
@@ -285,16 +285,16 @@
     redirect_vid = 'incontext'
 
 
-class AdaptedListView(ListItemView):
+class AdaptedListView(EntityView):
     """list of entities of the same type"""
     id = 'adaptedlist'
-    __select__ = non_final_entity() & one_etype_rset()
+    __select__ = one_etype_rset()
     item_vid = 'adaptedlistitem'
 
     @property
     def title(self):
         etype = iter(self.rset.column_types(0)).next()
-        return display_name(self.req, etype, form='plural'))
+        return display_name(self.req, etype, form='plural')
 
     def call(self, **kwargs):
         """display a list of entities by calling their <item_vid> view"""