fix poster
This commit is contained in:
parent
64de97e1b5
commit
edea2baea6
1 changed files with 2 additions and 2 deletions
|
@ -615,7 +615,7 @@ def siteposter(request, id, size=None):
|
||||||
def poster(request, id, size=None):
|
def poster(request, id, size=None):
|
||||||
item = get_object_or_404(models.Item, itemId=id)
|
item = get_object_or_404(models.Item, itemId=id)
|
||||||
if item.poster:
|
if item.poster:
|
||||||
return image_to_response(item, item.poster, size)
|
return image_to_response(item.poster, size)
|
||||||
else:
|
else:
|
||||||
poster_path = os.path.join(settings.STATIC_ROOT, 'png/posterDark.48.png')
|
poster_path = os.path.join(settings.STATIC_ROOT, 'png/posterDark.48.png')
|
||||||
response = HttpFileResponse(poster_path, content_type='image/jpeg')
|
response = HttpFileResponse(poster_path, content_type='image/jpeg')
|
||||||
|
@ -626,7 +626,7 @@ def poster(request, id, size=None):
|
||||||
def icon(request, id, size=None):
|
def icon(request, id, size=None):
|
||||||
item = get_object_or_404(models.Item, itemId=id)
|
item = get_object_or_404(models.Item, itemId=id)
|
||||||
if item.icon:
|
if item.icon:
|
||||||
return image_to_response(item, item.icon, size)
|
return image_to_response(item.icon, size)
|
||||||
else:
|
else:
|
||||||
raise Http404
|
raise Http404
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue