mirror of
https://github.com/django/django.git
synced 2025-09-26 20:19:16 +00:00
Fixed #2513 -- Changed LazyDate.__get_value__() to return date objects, not datetime objects
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3566 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9cd0c333d6
commit
54ea309a1d
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ class LazyDate(object):
|
||||||
return "<LazyDate: %s>" % self.delta
|
return "<LazyDate: %s>" % self.delta
|
||||||
|
|
||||||
def __get_value__(self):
|
def __get_value__(self):
|
||||||
return datetime.datetime.now() + self.delta
|
return (datetime.datetime.now() + self.delta).date()
|
||||||
|
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
return getattr(self.__get_value__(), attr)
|
return getattr(self.__get_value__(), attr)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue