akvo.rsr.feeds module
- class akvo.rsr.feeds.AllProjectUpdates[source]
Bases:
UpdateFeed
RSS feed for last 25 RSR updates.
- description = 'Project updates for all Akvo RSR projects'
- title = 'Last 25 RSR project updates'
- class akvo.rsr.feeds.OrganisationUpdates[source]
Bases:
UpdateFeed
RSS feed for last 25 RSR updates of an organisation.
- feed_type
alias of
RSRMediaRssFeed
- class akvo.rsr.feeds.ProjectUpdates[source]
Bases:
UpdateFeed
RSS feed for last 25 RSR updates of a project.
- class akvo.rsr.feeds.RSRMediaRssFeed(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)[source]
Bases:
Rss201rev2Feed
- class akvo.rsr.feeds.RSRSimplerXMLGenerator(out=None, encoding='iso-8859-1', short_empty_elements=False)[source]
Bases:
XMLGenerator
subclassed to be able to call custom escape() function, see above
- addQuickElement(name, contents=None, attrs=None)[source]
Convenience method for adding an element with no children
- characters(content)[source]
Receive notification of character data.
The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information.
- class akvo.rsr.feeds.UpdateFeed[source]
Bases:
Feed
base class generating Update feeds
- feed_type
alias of
RSRMediaRssFeed
- akvo.rsr.feeds.escape(data, entities={})[source]
Modification to xml.sax.saxutils.escape to that detects CDATA blocks that are not escaped
Escape &, <, and > in a string of data.
You can escape other strings of data by passing a dictionary as the optional entities parameter. The keys and values must all be strings; each key will be replaced with its corresponding value.