Ejemplo n.º 1
0
def init_config():
    from feedplatform.lib import collect_feed_data, store_feed_images
    config.configure(**{
        'DATABASE': 'sqlite:%s' % dbfile,
        'ADDINS': [
            collect_feed_data('title'),
            store_feed_images((imgpath, '%(model_id)d.%(extension)s',))
        ]
    })
from storm.locals import Unicode
from feedplatform import test as feedev
from feedplatform.lib import collect_feed_data


ADDINS = [
    # one unicode field, one datetime field with custom name,
    # one full custom field
    collect_feed_data('title', updated='last_updated', prism_issn=(Unicode, (), {}))
]


class ValidFeed(feedev.Feed):
    content = """
        <rss xmlns:prism="http://prismstandard.org/namespaces/1.2/basic/">
        <channel>
            {% <3 %}
            <title>
                {% =1 %}org title{% end %}
                {% =2 %}changed title{% end %}
            </title>
            {% end %}
            <pubDate>
                {% =1 %}Fri, 15 Aug 2008 23:01:39 +0200{% end %}
                {% =2 %}Fri, 17 Aug 2008 23:01:39 +0200{% end %}
            </pubDate>
            <prism:issn>
                {% =1 %}0066-6666{% end %}
                {% =2 %}0099-9999{% end %}
            </prism:issn>
        </channel></rss>