make ibreadcrumbs/iprevnext adapter works with MicroBlogEntry as well
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 09 Sep 2010 09:41:44 +0200
changeset 229 bbc7dce64608
parent 228 3dc7e3415005
child 230 f9511e22a124
make ibreadcrumbs/iprevnext adapter works with MicroBlogEntry as well
views/__init__.py
--- a/views/__init__.py	Thu Sep 09 09:39:44 2010 +0200
+++ b/views/__init__.py	Thu Sep 09 09:41:44 2010 +0200
@@ -3,14 +3,14 @@
 from cubicweb.web.views import ibreadcrumbs
 
 class BlogEntryIBreadCrumbsAdapter(ibreadcrumbs.IBreadCrumbsAdapter):
-    __select__ = is_instance('BlogEntry')
+    __select__ = is_instance('BlogEntry', 'MicroBlogEntry')
     def parent_entity(self):
         return self.entity.entry_of and self.entity.entry_of[0] or None
 
 
 class BlogEntryIPrevNextAdapter(EntityAdapter):
     __regid__ = 'IPrevNext'
-    __select__ = is_instance('BlogEntry')
+    __select__ = is_instance('BlogEntry', 'MicroBlogEntry')
 
     def next_entity(self):
         return self._sibling_entry('ASC', '>')