diff options
author | Alban Gruin | 2017-09-08 21:48:47 +0200 |
---|---|---|
committer | Alban Gruin | 2017-09-08 21:48:47 +0200 |
commit | 5eae1571d2e2a446958c9576b6dbe4a59c488e60 (patch) | |
tree | c06dea294a6cfbe3b9cc79dbd2877a1c9865ffdb /feeds.py | |
parent | 74a51992dc6c91d939e8d89eb35a8646b1a67f27 (diff) |
Génération du lien alternatif pour le flux atom.
Ajout d’un URL pour le flux atom
Diffstat (limited to 'feeds.py')
-rw-r--r-- | feeds.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -16,6 +16,7 @@ from django.core.exceptions import ObjectDoesNotExist from django.contrib.syndication.views import Feed from django.db.models import Q +from django.urls import reverse from django.utils.feedgenerator import Atom1Feed, SyndicationFeed from icalendar import Calendar, Event @@ -87,5 +88,10 @@ class AtomFeed(Feed): else: return group, updates + def link(self, obj): + group = obj[0] + link = reverse("timetable", kwargs={"year_slug": group.timetable.year.slug, "timetable_slug": group.timetable.slug, "group_slug": group.slug}) + return link + def items(self, obj): - pass + return [] |