aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlban Gruin2017-10-20 17:46:37 +0200
committerAlban Gruin2017-10-22 13:16:02 +0200
commit12184b16e97d9f5c6c99d6bfe79b1e5c53464fb3 (patch)
tree440ced76fc7b8a6d901923ed0931295e03e646f0
parentb7773b892ee68209feb33870496985f78243681a (diff)
Ajout d’un calendrier ICS spécifique pour un groupe qui ne prend pas
en compte les parents
-rw-r--r--feeds.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/feeds.py b/feeds.py
index c2c5b14..66be12e 100644
--- a/feeds.py
+++ b/feeds.py
@@ -87,6 +87,11 @@ class IcalFeed(Feed):
"location": format_rooms(item.rooms.all())}
+class IcalOnlyOneFeed(IcalFeed):
+ def items(self, obj):
+ return Course.objects.filter(groups=obj).order_by("begin")
+
+
class RSSFeed(Feed):
def get_object(self, request, year_slug, timetable_slug, group_slug):
year, week = get_current_or_next_week()