def cached_idol(self): if not self._cache_idol_last_update or self._cache_idol_last_update < timezone.now( ) - datetime.timedelta(days=self._cache_idol_days): self.force_cache_idol() return AttrDict({ 'pk': self.idol_id, 'id': self.idol_id, 'name': self._cache_idol_name, 'japanese_name': self._cache_idol_japanese_name, 'i_type': self._cache_idol_i_type, 'type': TYPE_DICT[self._cache_idol_i_type] if self._cache_idol_i_type is not None else None, 'english_type': ENGLISH_TYPE_DICT[self._cache_idol_i_type] if self._cache_idol_i_type is not None else None, 'image': self._cache_idol_image, 'image_url': get_image_url(self._cache_idol_image), 'http_image_url': get_http_image_url(self._cache_idol_image), 'item_url': u'/idol/{}/{}/'.format(self.idol_id, tourldash(self._cache_idol_name)), 'ajax_item_url': u'/ajax/idol/{}/'.format(self.idol_id), })
def http_puchi_awakened_url(self): return get_http_image_url(self.puchi_awakened)
def http_puchi_url(self): return get_http_image_url(self.puchi)
def http_icon_awakened_url(self): return get_http_image_url(self.icon_awakened)
def http_icon_url(self): return get_http_image_url(self.icon)
def http_transparent_awakened_url(self): return get_http_image_url(self.transparent_awakened)
def http_transparent_url(self): return get_http_image_url(self.transparent)
def http_art_hd_awakened_url(self): return get_http_image_url(self.art_hd_awakened)
def http_art_url(self): return get_http_image_url(self.art)