File manager - Edit - /opt/imh-python/lib/python2.7/site-packages/werkzeug/contrib/atom.pyc
Back
� �[�Rc @ s� d Z d d l m Z d d l m Z d d l m Z d d l m Z m Z d Z d d � Z d � Z e d e f d � � Y� Z e d e f d � � Y� Z d S( se werkzeug.contrib.atom ~~~~~~~~~~~~~~~~~~~~~ This module provides a class called :class:`AtomFeed` which can be used to generate feeds in the Atom syndication format (see :rfc:`4287`). Example:: def atom_feed(request): feed = AtomFeed("My Blog", feed_url=request.url, url=request.host_url, subtitle="My example blog for a feed test.") for post in Post.query.limit(10).all(): feed.add(post.title, post.body, content_type='html', author=post.author, url=post.url, id=post.uid, updated=post.last_update, published=post.pub_date) return feed.get_response() :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. i����( t datetime( t escape( t BaseResponse( t implements_to_stringt string_typess http://www.w3.org/1999/xhtmlc C sW | d k r d | t | | f S| s= d | t | � | f Sd | | t | � | f S( s? Helper function for the builder that creates an XML text block.t xhtmlu/ <%s type="xhtml"><div xmlns="%s">%s</div></%s> u <%s>%s</%s> u <%s type="%s">%s</%s> ( t XHTML_NAMESPACER ( t namet contentt content_type( ( sD /opt/imh-python/lib/python2.7/site-packages/werkzeug/contrib/atom.pyt _make_text_block"