From 2ca37240571648c9272f6760ffb54a7575ab3a26 Mon Sep 17 00:00:00 2001 From: Sanj Date: Fri, 25 Nov 2011 00:45:25 +0530 Subject: [PATCH] main_image foo bar --- itf/app/models.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/itf/app/models.py b/itf/app/models.py index 5b52b64..d8ad9af 100755 --- a/itf/app/models.py +++ b/itf/app/models.py @@ -88,7 +88,9 @@ class ItfModel(models.Model): def get_main_image(self): - main_image = self.main_image() + main_image = self.main_image + if type(main_image).__name__ == 'function': + main_image = main_image() if main_image is not None: imgfield = main_image elif self.get_modelextra().default_image: @@ -106,9 +108,10 @@ class ItfModel(models.Model): 'thumb': thumb } - + ''' def main_image(self): return None + ''' def get_template_path(self): kls = self.__class__