kill EmptyRsetVeiw tls-sprint
authorsylvain.thenault@logilab.fr
Mon, 16 Feb 2009 19:20:30 +0100
branchtls-sprint
changeset 632 3a394a90b702
parent 631 99f5852f8604
child 633 087e3f1e87c8
kill EmptyRsetVeiw
common/view.py
web/views/baseviews.py
--- a/common/view.py	Mon Feb 16 18:26:13 2009 +0100
+++ b/common/view.py	Mon Feb 16 19:20:30 2009 +0100
@@ -86,6 +86,7 @@
     attributes are added and the `w` attribute will be set at rendering
     time to a write function to use.
     """
+    __registerer__ = priority_registerer
     __registry__ = 'views'
 
     templatable = True
@@ -404,12 +405,6 @@
         return labels
 
 
-class EmptyRsetView(View):
-    """base class for views applying on any empty result sets"""
-    __registerer__ = priority_registerer
-    __selectors__ = (empty_rset,)
-
-
 # concrete template base classes ##############################################
 
 class Template(View):
@@ -433,7 +428,6 @@
     There is usually at least a regular main template and a simple fallback
     one to display error if the first one failed
     """
-
     base_doctype = STRICT_DOCTYPE
 
     @property
--- a/web/views/baseviews.py	Mon Feb 16 18:26:13 2009 +0100
+++ b/web/views/baseviews.py	Mon Feb 16 19:20:30 2009 +0100
@@ -22,12 +22,12 @@
 from logilab.mtconverter import TransformError, html_escape, xml_escape
 
 from cubicweb import Unauthorized, NoSelectableObject, typed_eid
-from cubicweb.common.selectors import (yes, nonempty_rset, accept,
-                                       one_line_rset, match_search_state, 
+from cubicweb.common.selectors import (yes, empty_rset, nonempty_rset, one_line_rset,
+                                       accept, match_search_state, 
                                        match_form_params, accept_rset)
 from cubicweb.common.uilib import (cut, printable_value,  UnicodeCSVWriter,
                                    ajax_replace_url, rql_for_eid, simple_sgml_tag)
-from cubicweb.common.view import EntityView, AnyRsetView, EmptyRsetView
+from cubicweb.common.view import EntityView, AnyRsetView, View
 from cubicweb.web.httpcache import MaxAgeHTTPCacheManager
 from cubicweb.web.views import vid_from_rset, linksearch_select_url
 
@@ -42,8 +42,9 @@
     cell_call = call
 
 
-class NoResultView(EmptyRsetView):
+class NoResultView(View):
     """default view when no result has been found"""
+    __selectors__ = (empty_rset,)
     id = 'noresult'
     
     def call(self, **kwargs):