Skip to content

Django multiple params link

I have this

path('calendar/<dt:date>/', views.CertainDay.as_view(), name="classrooms"),
path('calendar/<dt:date>/<int:classroom>/', views.ScheduleList.as_view(), name="schedule"),

first path with one args works good with reverse func in some file

how i can do this -> from .../calendar/2020-01-01 to .../calendar/2020-01-01/100 in template without using context and 2 args like url " " date arg2

something like <a href = "{% url 'schedule' *** %}> tries reverse full path with two args



If you are on URL and you want to go on, you can have a relative link like this :

<a href="100/">Go to 100</a>

No need to use the template function {% url 'schedule' *** %} but this is not the cleaner solution since it is harder to debug.