def get_img_absolute_urls(self, photo_host_url=""): img_dict = dict() for n in ['img', 'thumbnail', 'reduced']: if hasattr(self, n): img_dict[n] = getattr(self, n) return get_img_dict_absolute_url(img_dict, photo_host_url)
def get_photo_absolute_urls(self, photo_host_url=""): if self.photo: img_dict = dict(full=self.photo, reduced=self.reduced_photo, thumbnail=self.thumbnail) return get_img_dict_absolute_url(img_dict, photo_host_url) return None