From d26558ebf3e7ec5c2f94e8644620259b6d172287 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 28 Feb 2006 14:17:59 +0000 Subject: [PATCH] magic-removal: Fixed #1414 -- Added __getattr__() to LazyDate. Thanks, akaihola git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2439 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/django/db/models/__init__.py b/django/db/models/__init__.py index e371b1e37c..fd73cc92de 100644 --- a/django/db/models/__init__.py +++ b/django/db/models/__init__.py @@ -35,3 +35,6 @@ class LazyDate: def __get_value__(self): return datetime.datetime.now() + self.delta + + def __getattr__(self, attr): + return getattr(self.__get_value__(), attr)