Answer the question
In order to leave comments, you need to log in
Django 2. How to pass data about this week, month, etc. to context?
I need to display the change in the lesson schedule for 3 weeks, that is, for the previous, current and next. But even if there are no changes in the schedule, then everything is exactly what I need to generate blocks in which the date and the name of the day of the week will be indicated, the only difference is that they will display empty fields instead of changes.
That is, in fact, I need a list with the dates of the previous, current and next week, which can be passed to the template, for example, through context, and just as easy to iterate over.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question