This commit is contained in:
Parsa Nazer
2025-01-26 20:43:10 +03:30
parent 6549b1b4cb
commit 25294edb49
2 changed files with 31 additions and 1 deletions
@@ -0,0 +1,28 @@
# Generated by Django 5.1.2 on 2025-01-26 17:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('product', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='productmodel',
old_name='image',
new_name='image1',
),
migrations.AddField(
model_name='productmodel',
name='image2',
field=models.ImageField(blank=True, null=True, upload_to='product_images/'),
),
migrations.AddField(
model_name='productmodel',
name='image3',
field=models.ImageField(blank=True, null=True, upload_to='product_images/'),
),
]
+3 -1
View File
@@ -75,7 +75,9 @@ class ProductModel(models.Model):
('derham', 'درهم') ('derham', 'درهم')
) )
currency = models.CharField(verbose_name='نوع ارز', max_length=20, choices=currency_type) currency = models.CharField(verbose_name='نوع ارز', max_length=20, choices=currency_type)
image = models.ImageField(upload_to='product_images/') image1 = models.ImageField(upload_to='product_images/')
image2 = models.ImageField(upload_to='product_images/', blank=True, null=True)
image3 = models.ImageField(upload_to='product_images/', blank=True, null=True)
rating = models.PositiveIntegerField(default=0) rating = models.PositiveIntegerField(default=0)
view = models.IntegerField(default=0, verbose_name='بازدید') view = models.IntegerField(default=0, verbose_name='بازدید')
sell = models.IntegerField(default=0, verbose_name='فروش') sell = models.IntegerField(default=0, verbose_name='فروش')