13_export_ical_event #116
@ -71,7 +71,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<a href="{% url 'export_event_ical' event.id %}" role="button">Exporter ical {% picto_from_name "calendar" %}</a>
|
||||
<a href="{% url 'export_event_ical' event.start_day.year event.start_day.month event.start_day.day event.id %}" role="button">Exporter ical {% picto_from_name "calendar" %}</a>
|
||||
{% if perms.agenda_culturel.change_event and not noedit %}
|
||||
{% include "agenda_culturel/edit-buttons-inc.html" with event=event %}
|
||||
{% endif %}
|
||||
|
@ -158,7 +158,10 @@ urlpatterns = [
|
||||
UnknownPlaceAddView.as_view(),
|
||||
name="add_place_to_event",
|
||||
),
|
||||
path("event/<int:pk>", export_event_ical, name="export_event_ical"),
|
||||
path(
|
||||
"event/<int:year>/<int:month>/<int:day>/<int:pk>/ical",
|
||||
export_event_ical,
|
||||
name="export_event_ical"),
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
|
@ -598,8 +598,9 @@ def import_from_url(request):
|
||||
)
|
||||
|
||||
|
||||
def export_event_ical(request, pk):
|
||||
def export_event_ical(request, year, month, day, pk):
|
||||
event = get_object_or_404(Event, pk=pk)
|
||||
event = event.get_recurrence_at_date(year, month, day)
|
||||
|
||||
events = list()
|
||||
events.append(event)
|
||||
|
Loading…
Reference in New Issue
Block a user