Ticket #2513: lazydate.patch

File lazydate.patch, 500 bytes (added by wangbin@…, 18 years ago)

patch for django 0.95

  • django/db/models/__init__.py

     
    4747        return "<LazyDate: %s>" % self.delta
    4848
    4949    def __get_value__(self):
    50         return datetime.datetime.now() + self.delta
     50        return (datetime.datetime.now() + self.delta).date()
    5151
    5252    def __getattr__(self, attr):
    5353        return getattr(self.__get_value__(), attr)
Back to Top