Changeset - 18addfe969da
[Not reviewed]
0 2 0
Bradley Kuhn (bkuhn) - 10 years ago 2014-07-14 14:52:41
bkuhn@ebb.org
Additional issues deal with feed_dict deprecation.
2 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
www/conservancy/feeds.py
Show inline comments
...
 
@@ -230,21 +230,22 @@ class BlogFeed(ConservancyFeedBase):
 
        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]
 

	
 

	
 

	
 
for k, v in feed_dict.items():
 
    v.get_absolute_url = '/feeds/%s/' % k
 
BlogFeed.get_absolute_url = '/feeds/blog/'
 
PressRelease.get_absolute_url = '/feeds/news/'
 
OmnibusFeed.get_absolute_url = '/feeds/omnibus/'
 

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

	
 
    feeds = feed_dict.values()
 
    return render_to_response("feeds.html", {'feeds': feeds})
www/conservancy/urls.py
Show inline comments
...
 
@@ -9,25 +9,24 @@
 
# AGPL published by the FSF.
 
#
 
# This program is distributed in the hope that it will be useful, but
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero
 
# General Public License for more details.
 
#
 
# You should have received a copy of the GNU Affero General Public License
 
# along with this program in a file in the toplevel directory called
 
# "AGPLv3".  If not, see <http://www.gnu.org/licenses/>.
 

	
 
from django.conf.urls.defaults import *
 
from conservancy.feeds import feed_dict
 
from django.contrib import admin
 

	
 
handler404 = 'modpythoncustom.view404'
 

	
 
admin.autodiscover()
 

	
 
urlpatterns = patterns('',
 
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),
 
    (r'^admin/(.*)', admin.site.urls),
 
    (r'^feeds/blog/?$', 'django.contrib.syndication.views.Feed', BlogFeed()),
 
    (r'^feeds/news/?$', 'django.contrib.syndication.views.Feed', PressReleaseFeed()),
 
    (r'^feeds/omnibus/?$', 'django.contrib.syndication.views.Feed', OmnibusFeed()),
0 comments (0 inline, 0 general)