turbofeeds.widgets.FeedLinks

Package turbofeeds :: Module widgets :: Class FeedLinks |
[hide private]

# Class FeedLinks

source code

                        object --+
                                 |
    turbogears.widgets.base.Widget --+
                                     |
                                    FeedLinks

A list of links to feeds for all supported formats.

value is the link text. May use "%(type)s" placeholder for the feed format name.

Nested Classes | [hide private]
| template_c
Inherited from `turbogears.widgets.base.Widget`: `__metaclass__`

Instance Methods | [hide private]
update_params(self, params) Sets feed URL to callable that generates URL for each format. | source code
feed_url(self, base_url, type, params) Returns feed URL by combining base_url, feed type and params. | source code
Inherited from `turbogears.widgets.base.Widget`: `__call__`, `__init__`, `__repr__`, `__setattr__`, `adjust_value`, `display`, `render`, `retrieve_css`, `retrieve_javascript`, `update_data` Inherited from `turbogears.widgets.base.Widget` (private): `_get_is_named` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__str__`

Class Variables | [hide private]
| params = ``[``'``feed_types``'``,` `'``controller``'``,` `'``base_url``'``,` `'``url_params``'``...``
| template = ``'``<div xmlns:py="http://purl.org/kid/ns#" py:strip="``...``
| css = ``[`CSSLink(name='css/feeds.css', media='screen')`]``
| base_url = `<turbogears.widgets.meta.ParamDescriptor object at `...``
| controller = `<turbogears.widgets.meta.ParamDescriptor object a`...``
| feed_types = `<turbogears.widgets.meta.ParamDescriptor object a`...``
| title = `<turbogears.widgets.meta.ParamDescriptor object at 0x8`...``
| url_params = `<turbogears.widgets.meta.ParamDescriptor object a`...``
| params_doc = ``{``'``base_url``'``:` `'``The base_url of the feed. The feed` `...``
| _param_base_url = `<turbogears.widgets.meta.ParamDescriptor obj`...``
| _param_controller = `<turbogears.widgets.meta.ParamDescriptor o`...``
| _param_feed_types = ``[``(``'``rss2_0``'``,` `'``RSS 2.0``'``)``,` `(``'``atom0_3``'``,` `'``Atom` `...``
| _param_title = ``'````'``
| _param_url_params = ``{``}``
| template_vars = ``[``'``feed_types``'``,` `'``controller``'``,` `'``base_url``'``,` `'``url_``...``
Inherited from `turbogears.widgets.base.Widget`: `default`, `javascript`, `name` Inherited from `turbogears.widgets.base.Widget` (private): `_locked`

Properties | [hide private]
Inherited from `turbogears.widgets.base.Widget`: `is_named` Inherited from `object`: `__class__`

Method Details | [hide private]

### update_params(self, params) | source code
Sets feed URL to callable that generates URL for each format. Overrides: turbogears.widgets.base.Widget.update_params

Class Variable Details | [hide private]

  ### params Value:
      ['feed_types', 'controller', 'base_url', 'url_params', 'title']

  ### template Value:
      '''<div xmlns:py="http://purl.org/kid/ns#" py:strip="">
        <ul class="feedlinklist">
          <li py:for="type, name in feed_types">
            <a py:attrs="dict(title=title % dict(type=name))" class="feedlin
      k"
              href="${feed_url(type)}">${value % dict(type=name)}</a>
          </li>
        </ul>
      ...

  ### base_url Value:
      None

  ### controller Value:
      None

  ### feed_types Value:
      [('rss2_0', 'RSS 2.0'), ('atom0_3', 'Atom 0.3'), ('atom1_0', 'Atom 1.0
      ')]

  ### title Value:
      ''

  ### url_params Value:
      {}

  ### params_doc Value:
      {'base_url': 'The base_url of the feed. The feed format will be append
      ed to this. Can be determined from "controler", if given.',
       'controller': 'The FeedController instance serving the feeds the link
      s will point to.',
       'feed_types': 'A list of 2-item tuples matching format identifier to
      format name. A link will be generated for each format.',
       'title': 'String to use for "title" attribute of feed links. May use
      "%(type)s" placeholder for the feed format name.',
      ...

  ### _param_base_url Value:
      None

  ### _param_controller Value:
      None

  ### _param_feed_types Value:
      [('rss2_0', 'RSS 2.0'),
       ('atom0_3', 'Atom 0.3'),
       ('atom1_0', 'Atom 1.0')]

  ### template_vars Value:
      ['feed_types', 'controller', 'base_url', 'url_params', 'title']