diff --git a/shop/migrations/0002_alter_productprice_options_alter_tax_options_and_more.py b/shop/migrations/0002_alter_productprice_options_alter_tax_options_and_more.py new file mode 100644 index 0000000..0b6148c --- /dev/null +++ b/shop/migrations/0002_alter_productprice_options_alter_tax_options_and_more.py @@ -0,0 +1,34 @@ +# Generated by Django 5.0.6 on 2024-05-26 11:16 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("shop", "0001_initial"), + ] + + operations = [ + migrations.AlterModelOptions( + name="productprice", + options={ + "ordering": ("-date",), + "verbose_name": "precio de producto", + "verbose_name_plural": "precio de producto", + }, + ), + migrations.AlterModelOptions( + name="tax", + options={ + "ordering": ("id",), + "verbose_name": "impuesto", + "verbose_name_plural": "impuestos", + }, + ), + migrations.AlterField( + model_name="product", + name="description", + field=models.TextField(blank=True, default="", verbose_name="Descripción"), + ), + ] diff --git a/shop/models.py b/shop/models.py index 90e4eef..874c436 100644 --- a/shop/models.py +++ b/shop/models.py @@ -44,8 +44,7 @@ class Product(TimestampedModel): null=False, verbose_name=_("Nombre"), ) - description = models.CharField( - max_length=1000, + description = models.TextField( blank=True, default="", verbose_name=_("Descripción"), @@ -161,6 +160,7 @@ class Tax(TimestampedModel): class Meta: verbose_name = _("impuesto") verbose_name_plural = _("impuestos") + ordering = ("id", ) class Customer(TimestampedModel):