Spaces:
Runtime error
Runtime error
gamingflexer
commited on
Commit
·
1c114a1
1
Parent(s):
376cbd6
Update models to allow null values for certain fields
Browse files- .gitignore +8 -1
- src/app/api/models.py +16 -16
.gitignore
CHANGED
|
@@ -165,4 +165,11 @@ src/app/api/migrations/__init__.py
|
|
| 165 |
src/app/api/migrations/0001_initial.py
|
| 166 |
src/app/api/migrations/0003_record.py
|
| 167 |
src/app/api/migrations/0002_database_rename_manufacturer_product_manufactured_by_and_more.py
|
| 168 |
-
/home/cosmos/Catalog-Digitization-/src/app/main/static
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 165 |
src/app/api/migrations/0001_initial.py
|
| 166 |
src/app/api/migrations/0003_record.py
|
| 167 |
src/app/api/migrations/0002_database_rename_manufacturer_product_manufactured_by_and_more.py
|
| 168 |
+
/home/cosmos/Catalog-Digitization-/src/app/main/static
|
| 169 |
+
curated_barcode_images_5000_data.xlsx
|
| 170 |
+
merged_catalogue.xlsx
|
| 171 |
+
src/app/api/migrations/0004_delete_record.py
|
| 172 |
+
src/app/api/migrations/0005_alter_database_barcode_alter_database_brand_and_more.py
|
| 173 |
+
src/app/api/migrations/0006_alter_product_barcode_alter_product_brand_and_more.py
|
| 174 |
+
src/app/api/migrations/0007_alter_product_price.py
|
| 175 |
+
src/app/media/images/*
|
src/app/api/models.py
CHANGED
|
@@ -4,17 +4,17 @@ from django.urls.base import reverse
|
|
| 4 |
|
| 5 |
|
| 6 |
class Product(models.Model):
|
| 7 |
-
barcode = models.CharField(max_length=20)
|
| 8 |
-
brand = models.CharField(max_length=100)
|
| 9 |
sub_brand = models.CharField(max_length=100, blank=True, null=True)
|
| 10 |
-
manufactured_by = models.CharField(max_length=200)
|
| 11 |
-
product_name = models.CharField(max_length=200)
|
| 12 |
-
weight = models.FloatField()
|
| 13 |
variant = models.CharField(max_length=100, blank=True, null=True)
|
| 14 |
net_content = models.CharField(max_length=100, blank=True, null=True)
|
| 15 |
-
price = models.DecimalField(max_digits=10, decimal_places=2)
|
| 16 |
-
parent_category = models.CharField(max_length=100)
|
| 17 |
-
child_category = models.CharField(max_length=100)
|
| 18 |
sub_child_category = models.CharField(max_length=100, blank=True, null=True)
|
| 19 |
images_paths = models.CharField(max_length=3000, blank=True, null=True) # Comma separated paths
|
| 20 |
description = models.TextField(max_length=3000, blank=True, null=True)
|
|
@@ -26,17 +26,17 @@ class Product(models.Model):
|
|
| 26 |
|
| 27 |
|
| 28 |
class Database(models.Model):
|
| 29 |
-
barcode = models.CharField(max_length=20)
|
| 30 |
-
brand = models.CharField(max_length=100)
|
| 31 |
sub_brand = models.CharField(max_length=100, blank=True, null=True)
|
| 32 |
-
manufactured_by = models.CharField(max_length=200)
|
| 33 |
-
product_name = models.CharField(max_length=200)
|
| 34 |
-
weight = models.FloatField()
|
| 35 |
variant = models.CharField(max_length=100, blank=True, null=True)
|
| 36 |
net_content = models.CharField(max_length=100, blank=True, null=True)
|
| 37 |
-
price = models.DecimalField(max_digits=10, decimal_places=2)
|
| 38 |
-
parent_category = models.CharField(max_length=100)
|
| 39 |
-
child_category = models.CharField(max_length=100)
|
| 40 |
sub_child_category = models.CharField(max_length=100, blank=True, null=True)
|
| 41 |
images_paths = models.CharField(max_length=3000, blank=True, null=True) # Comma separated paths
|
| 42 |
description = models.TextField(max_length=3000, blank=True, null=True)
|
|
|
|
| 4 |
|
| 5 |
|
| 6 |
class Product(models.Model):
|
| 7 |
+
barcode = models.CharField(max_length=20, null=True)
|
| 8 |
+
brand = models.CharField(max_length=100, null=True)
|
| 9 |
sub_brand = models.CharField(max_length=100, blank=True, null=True)
|
| 10 |
+
manufactured_by = models.CharField(max_length=200, null=True)
|
| 11 |
+
product_name = models.CharField(max_length=200, null=True)
|
| 12 |
+
weight = models.FloatField(null=True)
|
| 13 |
variant = models.CharField(max_length=100, blank=True, null=True)
|
| 14 |
net_content = models.CharField(max_length=100, blank=True, null=True)
|
| 15 |
+
price = models.DecimalField(max_digits=10, decimal_places=2, null=True)
|
| 16 |
+
parent_category = models.CharField(max_length=100, null=True)
|
| 17 |
+
child_category = models.CharField(max_length=100, null=True)
|
| 18 |
sub_child_category = models.CharField(max_length=100, blank=True, null=True)
|
| 19 |
images_paths = models.CharField(max_length=3000, blank=True, null=True) # Comma separated paths
|
| 20 |
description = models.TextField(max_length=3000, blank=True, null=True)
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
class Database(models.Model):
|
| 29 |
+
barcode = models.CharField(max_length=20, null=True)
|
| 30 |
+
brand = models.CharField(max_length=100, null=True)
|
| 31 |
sub_brand = models.CharField(max_length=100, blank=True, null=True)
|
| 32 |
+
manufactured_by = models.CharField(max_length=200, null=True)
|
| 33 |
+
product_name = models.CharField(max_length=200, null=True)
|
| 34 |
+
weight = models.FloatField(null=True)
|
| 35 |
variant = models.CharField(max_length=100, blank=True, null=True)
|
| 36 |
net_content = models.CharField(max_length=100, blank=True, null=True)
|
| 37 |
+
price = models.DecimalField(max_digits=10, decimal_places=2,null=True)
|
| 38 |
+
parent_category = models.CharField(max_length=100,null=True)
|
| 39 |
+
child_category = models.CharField(max_length=100,null=True)
|
| 40 |
sub_child_category = models.CharField(max_length=100, blank=True, null=True)
|
| 41 |
images_paths = models.CharField(max_length=3000, blank=True, null=True) # Comma separated paths
|
| 42 |
description = models.TextField(max_length=3000, blank=True, null=True)
|