Django

Code

Changeset 2517

Show
Ignore:
Timestamp:
03/12/06 19:08:04 (3 years ago)
Author:
adrian
Message:

magic-removal: Fixed #1460 -- Fixed pub_datelt behavior in SQLite. Thanks for the patch, Malcolm Tredinnick

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/django/db/models/fields/__init__.py

    r2502 r2517  
    352352        if lookup_type == 'range': 
    353353            value = [str(v) for v in value] 
     354        elif lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte', 'ne'): 
     355            value = value.strftime('%Y-%m-%d') 
    354356        else: 
    355357            value = str(value) 
     
    399401            value = str(value) 
    400402        return Field.get_db_prep_save(self, value) 
     403 
     404    def get_db_prep_lookup(self, lookup_type, value): 
     405        if lookup_type == 'range': 
     406            value = [str(v) for v in value] 
     407        else: 
     408            value = str(value) 
     409        return Field.get_db_prep_lookup(self, lookup_type, value) 
    401410 
    402411    def get_manipulator_field_objs(self):