Commit a8cb9a99 authored by Ilham Maulana's avatar Ilham Maulana 💻

fix: image url payload

parent 951a02a1
......@@ -31,10 +31,7 @@ def bookView(request):
"title": book_item.title,
"author": book_item.author,
"description": book_item.description,
"cover_image": "http://"
+ host_name
+ ":8000"
+ book_item.cover_image.url,
"cover_image": host_name + book_item.cover_image.url,
"category": {
"name": book_item.category.name,
},
......@@ -45,10 +42,7 @@ def bookView(request):
"title": book_item.title,
"author": book_item.author,
"description": book_item.description,
"cover_image": "http://"
+ host_name
+ ":8000"
+ book_item.cover_image.url,
"cover_image": host_name + book_item.cover_image.url,
}
data.append(book)
......
host_name = "127.0.0.1"
host_name = "https://ilhammaulana.pythonanywhere.com"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment