class documentation

class SyndicationFeed:

Known subclasses: django.utils.feedgenerator.Atom1Feed, django.utils.feedgenerator.RssFeed

View In Hierarchy

Base class for all syndication feeds. Subclasses should provide write()
Method __init__ Undocumented
Method add​_item Add an item to the feed. All args are expected to be strings except pubdate and updateddate, which are datetime.datetime objects, and enclosures, which is an iterable of instances of the Enclosure class.
Method add​_item​_elements Add elements on each item (i.e. item/entry) element.
Method add​_root​_elements Add elements in the root (i.e. feed/channel) element. Called from write().
Method item​_attributes Return extra attributes to place on each item (i.e. item/entry) element.
Method latest​_post​_date Return the latest item's pubdate or updateddate. If no items have either of these attributes this return the current UTC date/time.
Method num​_items Undocumented
Method root​_attributes Return extra attributes to place on the root (i.e. feed/channel) element. Called from write().
Method write Output the feed in the given encoding to outfile, which is a file-like object. Subclasses should override this.
Method write​String Return the feed in the given encoding as a string.
Instance Variable feed Undocumented
Instance Variable items Undocumented
def __init__(self, title, link, description, language=None, author_email=None, author_name=None, author_link=None, subtitle=None, categories=None, feed_url=None, feed_copyright=None, feed_guid=None, ttl=None, **kwargs):

Undocumented

def add_item(self, title, link, description, author_email=None, author_name=None, author_link=None, pubdate=None, comments=None, unique_id=None, unique_id_is_permalink=None, categories=(), item_copyright=None, ttl=None, updateddate=None, enclosures=None, **kwargs):
Add an item to the feed. All args are expected to be strings except pubdate and updateddate, which are datetime.datetime objects, and enclosures, which is an iterable of instances of the Enclosure class.
def add_item_elements(self, handler, item):
def add_root_elements(self, handler):
Add elements in the root (i.e. feed/channel) element. Called from write().
def item_attributes(self, item):
Return extra attributes to place on each item (i.e. item/entry) element.
def latest_post_date(self):
Return the latest item's pubdate or updateddate. If no items have either of these attributes this return the current UTC date/time.
def num_items(self):

Undocumented

def root_attributes(self):
Return extra attributes to place on the root (i.e. feed/channel) element. Called from write().
def write(self, outfile, encoding):
Output the feed in the given encoding to outfile, which is a file-like object. Subclasses should override this.
def writeString(self, encoding):
Return the feed in the given encoding as a string.
feed =

Undocumented

items: list =

Undocumented