def get_photo(self): if self.header_image: return self.header_image else: try: return Photo.objects.get(slug=BLOG_PHOTO_SLUG + "-" + str(get_pattern(self.user))) except: return None
def get_blog_photo(self): try: return Photo.objects.get(slug=BLOG_PHOTO_SLUG + "-" + str(get_pattern(self))) except: return None