Hello, there is one database.
When displaying a table on an HTML page, it looks like this:
Applicant | Age | Height | Weight | Age | Height | Weight
Application 1 | 19 | 190 | 75 | 19 | 190 | 75
Application 1 | 19 | 190 | 75 | 19 | 190 | 75
Application 1 | 19 | 190 | 75 | 19 | 190 | 75
Application 2 | 21 | 170 | 67 | 21 | 170 | 67
Application 2 | 21 | 170 | 67 | 21 | 170 | 67
Application 2 | 21 | 170 | 67 | 21 | 170 | 67
I need to lead to this kind
Applicant | Age | Height | Weight
Application 1 | 19 | 190 | 75 |
Application 2 | 21 | 170 | 67 |
The table itself from the database looks like, application id, field, value.
The question is, can it be done by means of ORM to create a query that will convert all records with one value in (order id) into one object, or should it be done at the level of HTML code?
Now the query looks like this:
FieldsValues.objects.all()