Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2021
Kelas D
PT Gizi Sehat - Dietela
Dietela Backend
Commits
10b619b4
Commit
10b619b4
authored
Apr 26, 2021
by
Muzaki Azami
Browse files
Add nutritionist pic
parent
b779e1e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
nutritionists/migrations/0002_nutritionist_profile_picture.py
0 → 100644
View file @
10b619b4
# Generated by Django 3.1 on 2021-04-26 10:21
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'nutritionists'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'nutritionist'
,
name
=
'profile_picture'
,
field
=
models
.
ImageField
(
null
=
True
,
upload_to
=
'nutritionist'
),
),
]
nutritionists/models.py
View file @
10b619b4
...
...
@@ -9,6 +9,7 @@ class Nutritionist(models.Model):
handled_age_group
=
models
.
TextField
()
another_practice_place
=
models
.
CharField
(
max_length
=
255
)
languages
=
models
.
CharField
(
max_length
=
255
)
profile_picture
=
models
.
ImageField
(
upload_to
=
'nutritionist'
,
null
=
True
)
def
__str__
(
self
):
return
f
"
{
self
.
full_name_and_degree
}
"
payment/views.py
View file @
10b619b4
...
...
@@ -9,6 +9,7 @@ from .serializers import CartSerializer
from
.models
import
Cart
class
CartViewSet
(
viewsets
.
ModelViewSet
):
serializer_class
=
CartSerializer
queryset
=
Cart
.
objects
.
all
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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