Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2020
PPL-C
DTB-Layanan Fasilitas Publik Penyandang Disabilitas
PoiPoLeGan-PPLapanganTembak-DTB Layanan Fasilitas Publik Penyandang Disabilitas-BE
Commits
7f4030d1
Commit
7f4030d1
authored
Apr 21, 2020
by
Bimo Iman Smartadi
Browse files
[REFACTOR] Added default image value
parent
61e3baad
Pipeline
#42282
passed with stages
in 5 minutes and 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
informasi_fasilitas/views.py
View file @
7f4030d1
...
...
@@ -104,11 +104,15 @@ def add_fasilitas(request, nama_lokasi):
deskripsi
=
request
.
POST
[
'deskripsi'
]
rating
=
request
.
POST
[
'rating'
]
tag
=
request
.
POST
[
'tag'
].
split
()
image
=
""
if
'image'
in
request
.
POST
.
keys
():
image
=
str
(
request
.
POST
[
'image'
])
fasilitas
=
Fasilitas
.
objects
.
create
(
lokasi
=
lokasi
,
user
=
user
,
deskripsi
=
deskripsi
,
rating
=
rating
,
tag
=
tag
)
tag
=
tag
,
image
=
image
)
return
JsonResponse
({
'response'
:
'fasilitas added'
,
'id'
:
fasilitas
.
id
},
status
=
201
)
else
:
return
JsonResponse
({
'response'
:
request_error_message
(
"post"
)},
status
=
400
)
...
...
Write
Preview
Supports
Markdown
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