Skip to content

Commit

Permalink
update mode
Browse files Browse the repository at this point in the history
  • Loading branch information
msyoki committed Nov 20, 2020
1 parent 86de667 commit 985ddc7
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 3 deletions.
Binary file modified DRESSUP/__pycache__/settings.cpython-38.pyc
Binary file not shown.
Binary file modified DRESSUP/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file modified dressup/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file modified dressup/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file modified dressup/__pycache__/serializers.cpython-38.pyc
Binary file not shown.
Binary file modified dressup/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file modified dressup/__pycache__/views.cpython-38.pyc
Binary file not shown.
21 changes: 21 additions & 0 deletions dressup/migrations/0023_auto_20201120_2106.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 3.1.3 on 2020-11-20 18:06

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('dressup', '0022_merge_20201119_1017'),
]

operations = [
migrations.DeleteModel(
name='Category',
),
migrations.RenameField(
model_name='product',
old_name='username',
new_name='profile',
),
]
Binary file modified dressup/migrations/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion dressup/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Product(models.Model):
stock=models.IntegerField()
size=models.CharField(max_length=30)
category=models.CharField(max_length=30,choices=CATEGORY_CHOICES,default="Men")
username=models.ForeignKey(Profile,on_delete=models.CASCADE)
profile=models.ForeignKey(Profile,on_delete=models.CASCADE)



Expand Down
4 changes: 2 additions & 2 deletions dressup/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ class Meta:
class ProductSerializer(serializers.ModelSerializer):
class Meta:
model=Product
fields=('image','name','price','stock','size','category','username')
fields=('image','name','price','stock','size','category','profile')


class PostSerializer(serializers.ModelSerializer):
class Meta:
model=Product
fields=('image','name','price','stock','size','category','username')
fields=('image','name','price','stock','size','category')

0 comments on commit 985ddc7

Please sign in to comment.