Changeset - 02d97d1a7290
[Not reviewed]
0 1 0
Bradley Kuhn (bkuhn) - 9 years ago 2015-03-31 15:43:13
bkuhn@ebb.org
Additional feed_dict deprecation issue.

This use of feed_dict was not properly corrected when changes were made
due to feed_dict deprecation.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
www/conservancy/feeds.py
Show inline comments
...
 
@@ -233,26 +233,26 @@ class BlogFeed(ConservancyFeedBase):
 

	
 
        def OR_filter(field_name, subfield_name, objs):
 
            from django.db.models import Q
 
            return reduce(lambda x, y: x | y,
 
                          [Q(**{'%s__%s' % (field_name, subfield_name): x})
 
                           for x in objs])
 

	
 
        queryset = BlogEntry.objects.filter(pub_date__lte=datetime.now())
 

	
 
        if 'author' in GET:
 
            authors = GET.getlist('author')
 
            queryset = queryset.filter(OR_filter('author', 'username', authors))
 

	
 
        if 'tag' in GET:
 
            tags = GET.getlist('tag')
 
            queryset = queryset.filter(OR_filter('tags', 'slug', tags))
 

	
 
        return queryset.order_by('-pub_date')[:10]
 

	
 

	
 
def view(request):
 
    """Listing of all available feeds
 
    """
 

	
 
    feeds = feed_dict.values()
 
    feeds = (PressReleaseFeed, BlogFeed, OmnibusFeed)
 
    return render_to_response("feeds.html", {'feeds': feeds})
0 comments (0 inline, 0 general)