Also, you can use aggregate queries to get the tfidf max and min:

from django.db.models import Max, Min

Party.objects.all().aggregate(Max(tfidf'))
{'tfidf__max': 0.5 }

See https://docs.djangoproject.com/en/dev/topics/db/aggregation/#cheat-sheet


On Wednesday, 9 May 2012 01:00:18 UTC-4, Andy McKay wrote:
>
> You can hook into the model signal so that when the model changes, you 
> do you calculation and change your models. 
>
>
> https://docs.djangoproject.com/en/dev/ref/signals/#django.db.models.signals.post_save
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/-pW2UGkaJksJ.
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