Hi all.
I'm new to Django and I would like to get the unique values of a field
in a model.
For example:
Class Report(models.Model):
title = models.Charfield....
category = models...
author = models.ForeignKey(auth.User)
...
in views.py, how can I retrieve the unique values of the author?
example: if the Report.objects.all( )have the following author:
John
Mark
Eric
Matt
Matt
John
how can i have John, Mark, Eric, Matt?
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---