content type ics

This commit is contained in:
2020-12-11 23:29:10 +00:00
parent 5367bec4a3
commit 657e7d0b1b
2 changed files with 10 additions and 10 deletions

View File

@@ -34,7 +34,7 @@ def index(request):
def calendar(request):
events=deque(Post.objects.get_visible_articles().order_by('-public_date'))
return render(request, 'posts/fet_calendar.ics', {"events": events},content_type='text/plain')
return render(request, 'posts/fet_calendar.ics', {"events": events},content_type='text/calendar')
def tags(request, tag=""):
posts = deque(Post.objects.get_visible_articles().filter(tags__name=tag))
featured_post = Post.objects.get_visible_articles().filter(slug=tag).first()