make format

This commit is contained in:
SebF 2024-05-04 15:52:54 +02:00
parent 1fef9eeef9
commit 59d93cf686
2 changed files with 8 additions and 5 deletions

View File

@ -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)

View File

@ -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):