correction urls
This commit is contained in:
parent
bd310c7b44
commit
fc3b0f8320
@ -95,7 +95,7 @@
|
|||||||
<h2>Voir aussi</h2>
|
<h2>Voir aussi</h2>
|
||||||
</header>
|
</header>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<a role="button" href="{% url 'day_view' day.year day.month day.day%}" >Exporter ical {% picto_from_name "calendar" %}</a>
|
<a role="button" href="{% url 'day_view_ical' day.year day.month day.day%}" >Exporter ical {% picto_from_name "calendar" %}</a>
|
||||||
<a role="button" href="{% url 'week_view' day.year day|week %}?{{ filter.get_url }}">Toute la semaine</a>
|
<a role="button" href="{% url 'week_view' day.year day|week %}?{{ filter.get_url }}">Toute la semaine</a>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
@ -13,7 +13,7 @@ urlpatterns = [
|
|||||||
path("semaine/<int:year>/<int:week>/", week_view, name="week_view"),
|
path("semaine/<int:year>/<int:week>/", week_view, name="week_view"),
|
||||||
path("mois/<int:year>/<int:month>/", month_view, name="month_view"),
|
path("mois/<int:year>/<int:month>/", month_view, name="month_view"),
|
||||||
path("jour/<int:year>/<int:month>/<int:day>/", day_view, name="day_view"),
|
path("jour/<int:year>/<int:month>/<int:day>/", day_view, name="day_view"),
|
||||||
path("jour/<int:year>/<int:month>/<int:day>?feed=ical", day_view, name="day_view"),
|
path("jour/<int:year>/<int:month>/<int:day>?feed=ical", day_view_ical, name="day_view_ical"),
|
||||||
path("aujourdhui/", day_view, name="aujourdhui"),
|
path("aujourdhui/", day_view, name="aujourdhui"),
|
||||||
path("cette-semaine/", week_view, name="cette_semaine"),
|
path("cette-semaine/", week_view, name="cette_semaine"),
|
||||||
path("ce-mois-ci", month_view, name="ce_mois_ci"),
|
path("ce-mois-ci", month_view, name="ce_mois_ci"),
|
||||||
|
@ -301,8 +301,10 @@ def week_view(request, year=None, week=None, home=False):
|
|||||||
context["home"] = 1
|
context["home"] = 1
|
||||||
return render(request, "agenda_culturel/page-week.html", context)
|
return render(request, "agenda_culturel/page-week.html", context)
|
||||||
|
|
||||||
|
def day_view_ical(request, year=None, month=None, day=None):
|
||||||
|
return day_view(request, year, month, day, ical=True)
|
||||||
|
|
||||||
def day_view(request, year=None, month=None, day=None):
|
def day_view(request, year=None, month=None, day=None, ical=False):
|
||||||
now = date.today()
|
now = date.today()
|
||||||
if year is None:
|
if year is None:
|
||||||
year = now.year
|
year = now.year
|
||||||
|
Loading…
Reference in New Issue
Block a user