Ticket #7448: 7448-datefield-in.patch

File 7448-datefield-in.patch, 662 bytes (added by Collin Grady, 16 years ago)
  • django/db/models/fields/__init__.py

     
    552552            value = [smart_unicode(v) for v in value]
    553553        elif lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte') and hasattr(value, 'strftime'):
    554554            value = value.strftime('%Y-%m-%d')
     555        elif lookup_type == 'in':
     556            value = [v.strftime('%Y-%m-%d') for v in value]
    555557        else:
    556558            value = smart_unicode(value)
    557559        return Field.get_db_prep_lookup(self, lookup_type, value)
Back to Top