Let's see, first of all the characters [{}].
The filter
function always returns a list so the square brackets []. If you just wait for a result what you could do in the template is something like
{{ ing[0] }}
The inner braces mean that it is a field within the query, if you just want to get a field you could do the following.
{{ ing[0].sum }}
Where 'sum'
is a query field.
The second.
I would need to see the records in the database to be sure but possibly what is happening is that there is only one value in 'natural'
(which is 1066.0), that is to say when making the sum of all 'natural'
you only find one so that the result of the sum is the same. This makes sense because you are first filtered by the PK id_jovenclub
and this record only has a 'natural'
column.
I hope you gave me to understand and that you find the solution to your problem.