Ticket #3689: year-search.patch

File year-search.patch, 663 bytes (added by Dirk Datzert <dummy@…>, 18 years ago)

this would fix my problem

  • django/db/models/fields/__init__.py

     
    183183                value = int(value)
    184184            except ValueError:
    185185                raise ValueError("The __year lookup type requires an integer argument")
    186             return ['%s-01-01 00:00:00' % value, '%s-12-31 23:59:59.999999' % value]
     186            return ['%s-01-01' % value, '%s-12-31 23:59:59.999999' % value]
    187187        raise TypeError("Field has invalid lookup: %s" % lookup_type)
    188188
    189189    def has_default(self):
Back to Top