on améliore la détection des récurrences
This commit is contained in:
parent
a4965731e4
commit
bb6bebc5a7
@ -303,6 +303,9 @@ class Event(models.Model):
|
||||
|
||||
return result
|
||||
|
||||
def has_recurrences(self):
|
||||
# TODO: see https://forge.chapril.org/jmtrivial/agenda_culturel/issues/65
|
||||
return self.recurrences is not None and len(self.recurrences.rrules) != 0
|
||||
|
||||
def update_recurrence_dtstartend(self):
|
||||
sday = date.fromisoformat(self.start_day) if isinstance(self.start_day, str) else self.start_day
|
||||
|
@ -10,7 +10,7 @@
|
||||
{% if event.end_day %}du{% else %}le{% endif %}
|
||||
{% include "agenda_culturel/date-times-inc.html" with event=event %}
|
||||
{% picto_from_name "map-pin" %}
|
||||
{% if event.recurrences %}
|
||||
{% if event.has_recurrences %}
|
||||
<p class="subentry-search">
|
||||
{% picto_from_name "repeat" %}
|
||||
<!-- TODO: see https://forge.chapril.org/jmtrivial/agenda_culturel/issues/65 -->
|
||||
|
@ -68,7 +68,7 @@
|
||||
{% else %}
|
||||
<p><em>Cet événement est disponible uniquement sur les nuits énimagmatiques.</em></p>
|
||||
{% endif %}
|
||||
{% if event.recurrences %}
|
||||
{% if event.has_recurrences %}
|
||||
<p class="footer">
|
||||
{% picto_from_name "repeat" %}
|
||||
<!-- TODO: see https://forge.chapril.org/jmtrivial/agenda_culturel/issues/65 -->
|
||||
|
@ -47,7 +47,7 @@
|
||||
<p><em>À notre connaissance, cet événement n'est pas référencé autre part sur internet.</em></p>
|
||||
{% endif %}
|
||||
|
||||
{% if event.recurrences %}
|
||||
{% if event.has_recurrences %}
|
||||
<p class="footer">
|
||||
{% picto_from_name "repeat" %}
|
||||
<!-- TODO: see https://forge.chapril.org/jmtrivial/agenda_culturel/issues/65 -->
|
||||
|
Loading…
Reference in New Issue
Block a user