1 """The 'turbogears.feed' package is deprecated in TurboGears >= 1.1.
2
3 It will be REMOVED in TurboGears >= 1.5!
4
5 Please use the TurboFeeds extension <http://python.org/pypi/TurboFeeds> instead.
6
7 """
8 import time
9 from warnings import warn
10
11 import cherrypy
12 import turbogears
13
14
16 """ Object for generating feeds in multiple formats """
17
19 warnings.warn(__doc__, DeprecationWarning)
20 self.default = default
21 self.formats = ["atom1.0", "atom0.3", "rss2.0"]
22
24 date = date.strftime("%Y-%m-%dT%H:%M:%SZ")
25 return date
26
28 date = date.strftime("%a, %d %b %Y %H:%M:%S GMT")
29 return date
30
31 - def depr_entrys(self, feed):
32 if "entrys" in feed:
33 warn("You should use 'entries' instead of 'entrys'",
34 DeprecationWarning, 3)
35 feed['entries'] = feed['entrys']
36 del feed['entrys']
37
52
53 - def index(self, **kwargs):
55 index = turbogears.expose()(index)
56
63 atom1_0 = turbogears.expose(template="kid:turbogears.feed.atom1_0",
64 format="xml", content_type="application/atom+xml")(atom1_0)
65
72 atom0_3 = turbogears.expose(template="kid:turbogears.feed.atom0_3",
73 format="xml", content_type="application/atom+xml")(atom0_3)
74
80 rss2_0 = turbogears.expose(template="kid:turbogears.feed.rss2_0",
81 format="xml", content_type="application/rss+xml")(rss2_0)
82