If you change how your dictionary is formatted, it can be much easier:
dicc_one = {
    'string1': {'fieldsFK__total_one__gt': 0},
    'string2': {'fieldsFK__total_two__gt': 0},
    'string3': {'fieldsFK__total_three__gt': 0},
    'string4': {'fieldsFK__total_four__gt': 0},
}
results = {}
for k, v in dicc_one.items():
    results[k] = Model.objects.filter(**v).count()

Otherwise, you'll need to call v.split('=') to split the fields from the 
values.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/18b83194-d01e-4bf2-8ff7-5990e4a5c9c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to