Changeset - e75642ed4721
[Not reviewed]
0 1 0
Bradley Kuhn (bkuhn) - 8 years ago 2014-07-14 16:35:08
bkuhn@ebb.org
use get_object() in BlogFeed to get request object

Upon reading
https://docs.djangoproject.com/en/dev/ref/contrib/syndication/#a-complex-example

I think that this is what I need to do to forward-port this Django 1.2
to Django 1.4's Feed objects.
1 file changed with 11 insertions and 7 deletions:
0 comments (0 inline, 0 general)
www/conservancy/feeds.py
Show inline comments
...
 
@@ -155,6 +155,9 @@ class BlogFeed(ConservancyFeedBase):
 

	
 
    def title(self):
 
    def get_object(self, request):
 
        return request
 

	
 
    def title(self, obj):
 
        answer = "The Software Freedom Conservancy Blog"
 

	
 
        GET = self.request.GET
 
        GET = obj.GET
 
        tags = []
...
 
@@ -184,6 +187,6 @@ class BlogFeed(ConservancyFeedBase):
 
        
 
    def description(self):
 
    def description(self, obj):
 
        answer = "Blogs at the Software Freedom Conservancy"
 

	
 
        GET = self.request.GET
 
        GET = obj.GET
 
        tags = []
...
 
@@ -222,3 +225,3 @@ class BlogFeed(ConservancyFeedBase):
 
    def item_author_email(self, item):
 
        GET = self.request.GET
 
        GET = self.get_object().GET
 
        if not 'author' in GET:
...
 
@@ -238,4 +241,5 @@ class BlogFeed(ConservancyFeedBase):
 
        return item.pub_date
 
    def items(self):
 
        GET = self.request.GET
 

	
 
    def items(self, obj):
 
        GET = obj.GET
 

	
0 comments (0 inline, 0 general)