mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-17 12:06:55 +01:00
def thumbnail uses FORCE_SCRIPT_NAME
with this edit the tumbnails are show up..
This commit is contained in:
parent
6f5c1ac4e1
commit
e4854f2144
1 changed files with 5 additions and 1 deletions
|
|
@ -70,9 +70,13 @@ class DocumentAdmin(CommonAdmin):
|
||||||
created_.short_description = "Created"
|
created_.short_description = "Created"
|
||||||
|
|
||||||
def thumbnail(self, obj):
|
def thumbnail(self, obj):
|
||||||
|
if settings.FORCE_SCRIPT_NAME:
|
||||||
|
_src="{}/fetch/thumb/{}".format(settings.FORCE_SCRIPT_NAME,obj.id)
|
||||||
|
else:
|
||||||
|
_src="/fetch/thumb/{}".format(obj.id)
|
||||||
png_img = self._html_tag(
|
png_img = self._html_tag(
|
||||||
"img",
|
"img",
|
||||||
src="/fetch/thumb/{}".format(obj.id),
|
src=_src,
|
||||||
width=180,
|
width=180,
|
||||||
alt="Thumbnail of {}".format(obj.file_name),
|
alt="Thumbnail of {}".format(obj.file_name),
|
||||||
title=obj.file_name
|
title=obj.file_name
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue