D
D
Deleting Account2019-10-14 16:26:39
Django
Deleting Account, 2019-10-14 16:26:39

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

1 answer(s)
A
alternativshik, 2019-10-14
@Andriy_Kosmenyuk

well, generate in the date loop and pass

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question