Mercurial > public > sg101
comparison gpp/news/feeds.py @ 177:9b63ad1f2ad2
Fixing #59, again. Django ticket 13093 was fixed allowing cache_page to work in the URLconf.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Mon, 15 Mar 2010 03:26:38 +0000 |
parents | b7ac381996e8 |
children | b4305e18d3af |
comparison
equal
deleted
inserted
replaced
176:b7ac381996e8 | 177:9b63ad1f2ad2 |
---|---|
1 """ | 1 """ |
2 This file contains the feed classes for the news application. | 2 This file contains the feed classes for the news application. |
3 """ | 3 """ |
4 from django.contrib.syndication.views import Feed | 4 from django.contrib.syndication.views import Feed |
5 from django.utils.decorators import method_decorator | |
6 from django.views.decorators.cache import cache_page | |
7 | 5 |
8 from news.models import Story | 6 from news.models import Story |
9 from core.functions import get_full_name | 7 from core.functions import get_full_name |
10 from core.functions import copyright_str | 8 from core.functions import copyright_str |
11 | 9 |
17 link = '/feeds/news/' | 15 link = '/feeds/news/' |
18 description = 'News articles and stories from SurfGuitar101.com' | 16 description = 'News articles and stories from SurfGuitar101.com' |
19 ttl = '720' | 17 ttl = '720' |
20 author_name = 'Brian Neal' | 18 author_name = 'Brian Neal' |
21 author_email = 'admin@surfguitar101.com' | 19 author_email = 'admin@surfguitar101.com' |
22 | |
23 @method_decorator(cache_page(4 * 60 * 60)) | |
24 def __call__(self, request, *args, **kwargs): | |
25 return super(LatestNewsFeed, self).__call__(request, *args, **kwargs) | |
26 | 20 |
27 def feed_copyright(self): | 21 def feed_copyright(self): |
28 return copyright_str() | 22 return copyright_str() |
29 | 23 |
30 def items(self): | 24 def items(self): |