__init__(self,
default=' atom1.0 ' ,
base_url=' /feed ' ,
**feed_params)
(Constructor)
| source code
|
Constructor - Should be called with super() if overwritten.
The default arguments sets the default feed format when the
feed base URL is requested. Currently supported values are
atom1_0 (the default), atom0_3, rss2_0 and mrss1_1_1.
The base_url sets the URL where the feed controller is mounted
to the CherryPy object tree. The default is '/feed'. This is used
to construct the full feed URL for the link element in the feed,
if it is not overwritten by the link keyword argument.
Any extra keyword arguments will be assigned to the feed_params
attribute and added to the feed data everytime a feed is requested.
This can be used to set the feed info in the direct child elements
of the feed (Atom) resp. channel (RSS) root element of the
feed. Possible names include:
- author (dict with name, email and uri members)
- categories (list of strings, used by Atom 1.0 / RSS only)
- generator (string)
- updated (datetime)
- icon (URL, used by Atom 1.0 format only)
- id (string/URL, used by Atom formats only)
- logo (URL, used by Atom 1.0 / RSS format only)
- lang (string, used by RSS format only)
- link (URL)
- rights (string)
- subtitle (string)
- stylesheet (URL or dict with members href and type or a
callable returning either, used to place an appropriate
xml-stylesheet processing instruction at the top of the feed XML.
The stylesheet function will receive the format of the feed as the
first argument and all extra keyword arguments to this constructor
as keword arguments as well.)
- title (string)
For up-to-date information about supported elements and values, please
refer to the templates for the different feed formats in the
templates sub-package.
- Overrides:
object.__init__
|