entities/__init__.py
changeset 125 979dbe0cade3
parent 0 b97547f5f1fa
child 142 0425ee84cfa6
--- a/entities/__init__.py	Thu Nov 20 11:51:28 2008 +0100
+++ b/entities/__init__.py	Fri Nov 21 17:36:42 2008 +0100
@@ -16,7 +16,8 @@
 from cubicweb.common.entity import Entity
 from cubicweb.schema import FormatConstraint
 
-from cubicweb.interfaces import IBreadCrumbs
+from cubicweb.interfaces import IBreadCrumbs, IFeed
+
 
 class AnyEntity(Entity):
     """an entity instance has e_schema automagically set on the class and
@@ -52,7 +53,7 @@
         ('comments',           '*', 'object')  : ('generated', 'link'),
         }
 
-    __implements__ = (IBreadCrumbs,)
+    __implements__ = (IBreadCrumbs, IFeed)
     
     @classmethod
     def selected(cls, etype):
@@ -197,6 +198,10 @@
                 path.append( self.req._(view.title) )
         return path
 
+    ## IFeed interface ########################################################
+
+    def rss_feed_url(self):
+        return self.absolute_url(vid='rss')
     # abstractions making the whole things (well, some at least) working ######
     
     @classmethod