Fix missing images.
This commit is contained in:
parent
2b9dbcbb2d
commit
03778e9834
1 changed files with 2 additions and 1 deletions
|
@ -100,7 +100,8 @@ def get_page(name:str):
|
|||
img_name = img["src"]
|
||||
db_images = Image.objects.filter(name=img_name)
|
||||
if db_images:
|
||||
img["src"] = db_images[0].content.url
|
||||
url = db_images[0].content.url.replace("uploads/","")
|
||||
img["src"] = url
|
||||
|
||||
return HttpResponse(soup.prettify())
|
||||
|
||||
|
|
Loading…
Reference in a new issue