Ticket #7053: valueslist_extra_select_test.diff

File valueslist_extra_select_test.diff, 644 bytes (added by jlenton, 17 years ago)

a test that shows the buggy behavior

  • tests/modeltests/lookup/models.py

     
    185185...
    186186TypeError: 'flat' is not valid when valueslist is called with more than one field.
    187187
     188>>> Article.objects.extra(select={'id_plus_one': 'id+1'}).order_by('id').valueslist('id')
     189[(1,), (2,), (3,), (4,), (5,), (6,), (7,)]
     190
     191
    188192# Every DateField and DateTimeField creates get_next_by_FOO() and
    189193# get_previous_by_FOO() methods.
    190194# In the case of identical date values, these methods will use the ID as a
Back to Top