Hi everybody,
I would like to know if there if a simple way to know how many times a
given field contains a string.
e.g. Note.objects.filter(notedescription__contains='keyword')
What would be the recommended way to know how many times 'keyword' is
hit in the 'notedescriptiont' field? Do I have have to iterate over
the resulting queryset or can someone think of a more elegant way?
(i.e. is adding on the fly a 'count' field to each object in the
queryset feasible?)
Best regards,
G Florent

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to