neue Verzeichnissstruktur
This commit is contained in:
23
aggregator/feeds.py
Normal file
23
aggregator/feeds.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import django.contrib.syndication.views
|
||||
from .models import FeedItem
|
||||
|
||||
|
||||
class LatestFeedItems(django.contrib.syndication.views.Feed):
|
||||
link = "http://aol.animanga.at/"
|
||||
description = "Aktuelle Nachrichten aus der Austrian Otaku League"
|
||||
title = "AOL - Newsfeed"
|
||||
|
||||
def items(self, obj):
|
||||
return FeedItem.objects.get_recent_items()
|
||||
|
||||
def item_title(self, item):
|
||||
return "%s: %s" % (item.feed.title, item.title)
|
||||
|
||||
def item_description(self, item):
|
||||
return item.summary
|
||||
|
||||
def item_author_name(self, item):
|
||||
return item.feed.title
|
||||
|
||||
def item_pubdate(self, item):
|
||||
return item.date_modified
|
||||
Reference in New Issue
Block a user