I have a model, Designs. This contains several fields, one of which is a datetime field, date_submitted.
How can I return a list of just the datetime fields from a list of objects? For instance, I have:
design_list = Design.objects.all().order_by('-date_submitted')[:10]
But this contains all the fields. How can I isolate just the date_submitted fields into a list?
Have a look at values_list for QuerySets: