Django template: how can I rearrange the list of dictionaries by the attached property of each dictionary?

I am writing a template for a job listing site in which I want to order a set of short-term assignments by date, currently they are grouped by area. Working days are not consecutive and are stored as properties of each task. These are the days when I want assignments to be ordered.

I have a list of dictionaries (areas), each of these dictionaries contains key / value pairs for things like board, location. One of these properties is a list of dates on which the task will run.

all_jobs
    area_1
        job_1
           fee
           location
           days
               monday
               thursday
               friday
        job_2
           fee
           location
           days
               wednesday
     area_2
        job_3
           fee
           location
           days
               tuesday

, . , , , , .

.

+4

Source: https://habr.com/ru/post/1523631/


All Articles