minIo toglrilandi v6
This commit is contained in:
18
core/apps/api/migrations/0005_filialmodel_image.py
Normal file
18
core/apps/api/migrations/0005_filialmodel_image.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.7 on 2026-03-30 10:24
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0004_subcategorymodel_image'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='filialmodel',
|
||||
name='image',
|
||||
field=models.ImageField(blank=True, null=True, upload_to='filials/', verbose_name='image'),
|
||||
),
|
||||
]
|
||||
@@ -6,6 +6,7 @@ from model_bakery import baker
|
||||
|
||||
class FilialModel(AbstractBaseModel):
|
||||
name = models.CharField(verbose_name=_("name"), max_length=255)
|
||||
image = models.ImageField(verbose_name=_("image"), upload_to="filials/", null=True, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
@@ -7,4 +7,5 @@ class FilialSerializer(serializers.ModelSerializer):
|
||||
fields = [
|
||||
"id",
|
||||
"name",
|
||||
"image",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user