Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
library-app-django
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ilham Maulana
library-app-django
Commits
a8cb9a99
Commit
a8cb9a99
authored
Aug 12, 2024
by
Ilham Maulana
💻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: image url payload
parent
951a02a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
views.py
api/book/views.py
+2
-8
constants.py
config/constants.py
+1
-1
No files found.
api/book/views.py
View file @
a8cb9a99
...
@@ -31,10 +31,7 @@ def bookView(request):
...
@@ -31,10 +31,7 @@ def bookView(request):
"title"
:
book_item
.
title
,
"title"
:
book_item
.
title
,
"author"
:
book_item
.
author
,
"author"
:
book_item
.
author
,
"description"
:
book_item
.
description
,
"description"
:
book_item
.
description
,
"cover_image"
:
"http://"
"cover_image"
:
host_name
+
book_item
.
cover_image
.
url
,
+
host_name
+
":8000"
+
book_item
.
cover_image
.
url
,
"category"
:
{
"category"
:
{
"name"
:
book_item
.
category
.
name
,
"name"
:
book_item
.
category
.
name
,
},
},
...
@@ -45,10 +42,7 @@ def bookView(request):
...
@@ -45,10 +42,7 @@ def bookView(request):
"title"
:
book_item
.
title
,
"title"
:
book_item
.
title
,
"author"
:
book_item
.
author
,
"author"
:
book_item
.
author
,
"description"
:
book_item
.
description
,
"description"
:
book_item
.
description
,
"cover_image"
:
"http://"
"cover_image"
:
host_name
+
book_item
.
cover_image
.
url
,
+
host_name
+
":8000"
+
book_item
.
cover_image
.
url
,
}
}
data
.
append
(
book
)
data
.
append
(
book
)
...
...
config/constants.py
View file @
a8cb9a99
host_name
=
"
127.0.0.1
"
host_name
=
"
https://ilhammaulana.pythonanywhere.com
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment