2024-04-14 14:48:07 +00:00
|
|
|
from django.contrib.syndication.views import Feed
|
|
|
|
|
|
|
|
from django.urls import reverse
|
|
|
|
from .models import AdoptionNotice
|
|
|
|
|
|
|
|
|
|
|
|
class LatestAdoptionNoticesFeed(Feed):
|
2024-04-14 14:48:27 +00:00
|
|
|
title = "Notfellchen"
|
2024-04-14 14:48:07 +00:00
|
|
|
link = "/rss/"
|
|
|
|
description = "Updates zu neuen Vermittlungen."
|
|
|
|
|
|
|
|
def items(self):
|
|
|
|
return AdoptionNotice.objects.order_by("-created_at")[:5]
|
|
|
|
|
|
|
|
def item_title(self, item):
|
|
|
|
return item.name
|
|
|
|
|
|
|
|
def item_description(self, item):
|
|
|
|
return item.description
|
|
|
|
|