I have a question, in my view.py I have a question
example
ing =ingresos.objects.values('id').annotate(Sum('precio'))
works fine but as you will see in the tamplete I "paint" all the values in the database, how could that query to only show the annotate (value) according to the id of the establishment
url.py
url(r'^detalle_establecimiento/(?P<id_establecimiento>\d+)$','principal.views.detalle_establecimiento'),
I know that the culsulta that I do gives me back the correct value because I do it to all the objects of a model, but I want to select the value that corresponds to each establishment, that is id