Fakultas Ilmu Komputer UI

Commit 2ab15bf1 authored by Muzaki Azami's avatar Muzaki Azami
Browse files

Merge branch 'add-nutritionist-pic' into 'staging'

Add nutritionist pic

See merge request !49
parents b779e1e3 10b619b4
Pipeline #73416 passed with stages
in 17 minutes and 21 seconds
# 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'),
),
]
...@@ -9,6 +9,7 @@ class Nutritionist(models.Model): ...@@ -9,6 +9,7 @@ class Nutritionist(models.Model):
handled_age_group = models.TextField() handled_age_group = models.TextField()
another_practice_place = models.CharField(max_length=255) another_practice_place = models.CharField(max_length=255)
languages = models.CharField(max_length=255) languages = models.CharField(max_length=255)
profile_picture = models.ImageField(upload_to='nutritionist',null=True)
def __str__(self): def __str__(self):
return f"{self.full_name_and_degree}" return f"{self.full_name_and_degree}"
...@@ -9,6 +9,7 @@ from .serializers import CartSerializer ...@@ -9,6 +9,7 @@ from .serializers import CartSerializer
from .models import Cart from .models import Cart
class CartViewSet(viewsets.ModelViewSet): class CartViewSet(viewsets.ModelViewSet):
serializer_class = CartSerializer serializer_class = CartSerializer
queryset = Cart.objects.all() queryset = Cart.objects.all()
......
Supports Markdown
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