diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index b1c9a32..b92f9b6 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -1123,7 +1123,9 @@ class Event(models.Model): ) eventIcal.add("summary", event.title) eventIcal.add("name", event.title) - eventIcal.add("description", event.description + "\r" + event.reference_urls[0]) + eventIcal.add( + "description", event.description + "\r" + event.reference_urls[0] + ) eventIcal.add("location", event.exact_location or event.location) cal.add_component(eventIcal) diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index 96457b6..630dce1 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -10,7 +10,7 @@ from django.http import QueryDict from django import forms from django.contrib.postgres.search import SearchQuery, SearchHeadline -from django.http import HttpResponseRedirect, HttpResponse, HttpResponseNotFound, FileResponse +from django.http import HttpResponseRedirect, FileResponse from django.urls import reverse from collections import Counter @@ -608,9 +608,10 @@ def export_event_ical(request, pk): return FileResponse( cal.to_ical().decode("utf-8").replace("\r\n", "\n"), - as_attachment=True, - filename= event.title + ".ics", - content_type="text/calendar") + as_attachment=True, + filename=event.title + ".ics", + content_type="text/calendar", + ) class EventFilterAdmin(django_filters.FilterSet):