so I know of the model.objects.all() but is there a way that i could get all of the items for a certain part of that database?
say I have a database of books and under that I have the author and illustrator fields that you can enter. what would I enter so that it returned a list of all the authors?
so I know of the model.objects.all() but is there a way that i could
Share
Write like
Books.objects.values('author').distinct()You can check for distinct function in https://docs.djangoproject.com/en/1.3/ref/models/querysets/#distinct