Ticket #2211: datefield_lookup.diff

File datefield_lookup.diff, 549 bytes (added by paolo <paolo@…>, 18 years ago)
  • __init__.py

     
    412412        if lookup_type == 'range':
    413413            value = [str(v) for v in value]
    414414        elif lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte', 'ne'):
    415             value = value.strftime('%Y-%m-%d')
     415            value = self.to_python(value).strftime('%Y-%m-%d')
    416416        else:
    417417            value = str(value)
    418418        return Field.get_db_prep_lookup(self, lookup_type, value)
Back to Top