Code

Changes between Version 16 and Version 17 of QuerysetRefactorBranch


Ignore:
Timestamp:
04/26/08 23:07:36 (6 years ago)
Author:
russellm
Comment:

Updated reference to valueslist() to values_list()

Legend:

Unmodified
Added
Removed
Modified
  • QuerysetRefactorBranch

    v16 v17  
    2727 5. Querysets have a {{{reverse()}}} method that reverses whatever the current ordering is. 
    2828 6. The queryset {{{values()}}} method can retrieve fields that are related via a {{{ForeignKey}}} or {{{OneToOneField}}} relation. 
    29  7. A new {{{valueslist()}}} method has been added to querysets. This is similar to {{{values()}}} except that it returns a list of tuples, rather than a list of dictionaries. 
     29 7. A new {{{values_list()}}} method has been added to querysets. This is similar to {{{values()}}} except that it returns a list of tuples, rather than a list of dictionaries. 
    3030 8. You can specify a list of related fields to traverse in a {{{select_related()}}} call. This provides a way to select only the related data you are interested in. Only single-valued relations can be selected in this way, however (not {{{ManyToManyFields}}}). 
    3131 9. Filtering a queryset by checking if a field attribute is {{{None}}} is equivalent to testing if the corresponding database column is {{{NULL}}}. So {{{qs.filter(foo=None)}}} is now identical to {{{qs.filter(foo__isnull=True)}}}.