Beispiel #1
0
 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
Beispiel #2
0
 def get_blog_photo(self):
     try:
         return Photo.objects.get(slug=BLOG_PHOTO_SLUG + "-" + str(get_pattern(self)))
     except:
         return None