modificacion en el verbose_name de precio, cambio de DataTimeFields a DataFields…
… en fecha_creacion y cambio de nombre de precio a monto en edicto.ComprobantePago
Showing
3 changed files
with
52 additions
and
4 deletions
1 | +# Generated by Django 4.1.9 on 2023-09-06 10:15 | ||
2 | + | ||
3 | +from django.db import migrations, models | ||
4 | +import django.db.models.deletion | ||
5 | + | ||
6 | + | ||
7 | +class Migration(migrations.Migration): | ||
8 | + | ||
9 | + dependencies = [ | ||
10 | + ('edicto', '0008_alter_edicto_fecha_publicacion_alter_edicto_usuario'), | ||
11 | + ] | ||
12 | + | ||
13 | + operations = [ | ||
14 | + migrations.AlterModelOptions( | ||
15 | + name='precio', | ||
16 | + options={'verbose_name': 'Precio', 'verbose_name_plural': 'Precios'}, | ||
17 | + ), | ||
18 | + migrations.RenameField( | ||
19 | + model_name='comprobantepago', | ||
20 | + old_name='resultado', | ||
21 | + new_name='monto', | ||
22 | + ), | ||
23 | + migrations.AddField( | ||
24 | + model_name='comprobantepago', | ||
25 | + name='edicto', | ||
26 | + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='edicto.edicto'), | ||
27 | + preserve_default=False, | ||
28 | + ), | ||
29 | + ] |
1 | +# Generated by Django 4.1.9 on 2023-09-06 10:52 | ||
2 | + | ||
3 | +from django.db import migrations, models | ||
4 | + | ||
5 | + | ||
6 | +class Migration(migrations.Migration): | ||
7 | + | ||
8 | + dependencies = [ | ||
9 | + ('edicto', '0009_alter_precio_options_and_more'), | ||
10 | + ] | ||
11 | + | ||
12 | + operations = [ | ||
13 | + migrations.AlterField( | ||
14 | + model_name='edicto', | ||
15 | + name='fecha_creacion', | ||
16 | + field=models.DateField(auto_now_add=True), | ||
17 | + ), | ||
18 | + ] |
@@ -16,8 +16,8 @@ class Precio (models.Model): | @@ -16,8 +16,8 @@ class Precio (models.Model): | ||
16 | precio_ejemplar = models.FloatField(max_length=50, blank=False, null=False) | 16 | precio_ejemplar = models.FloatField(max_length=50, blank=False, null=False) |
17 | 17 | ||
18 | class Meta: | 18 | class Meta: |
19 | - verbose_name = 'Administrador' | ||
20 | - verbose_name_plural = 'Administradores' | 19 | + verbose_name = 'Precio' |
20 | + verbose_name_plural = 'Precios' | ||
21 | 21 | ||
22 | def __str__(self): | 22 | def __str__(self): |
23 | return self.moneda | 23 | return self.moneda |
@@ -34,7 +34,7 @@ class Edicto(models.Model): | @@ -34,7 +34,7 @@ class Edicto(models.Model): | ||
34 | cantidad_copias = models.PositiveIntegerField(blank=False, null=False) | 34 | cantidad_copias = models.PositiveIntegerField(blank=False, null=False) |
35 | fecha_publicacion = models.DateField(blank=True, null=True) | 35 | fecha_publicacion = models.DateField(blank=True, null=True) |
36 | observaciones = models.CharField(max_length=500, blank=True, null=True) | 36 | observaciones = models.CharField(max_length=500, blank=True, null=True) |
37 | - fecha_creacion = models.DateTimeField(auto_now_add=True) | 37 | + fecha_creacion = models.DateField(auto_now_add=True) |
38 | fecha_modificacion = models.DateTimeField(auto_now_add=True) | 38 | fecha_modificacion = models.DateTimeField(auto_now_add=True) |
39 | 39 | ||
40 | class Meta: | 40 | class Meta: |
@@ -46,9 +46,10 @@ class Edicto(models.Model): | @@ -46,9 +46,10 @@ class Edicto(models.Model): | ||
46 | 46 | ||
47 | 47 | ||
48 | class ComprobantePago(models.Model): | 48 | class ComprobantePago(models.Model): |
49 | - resultado = models.FloatField(blank=False, null=False) | 49 | + monto = models.FloatField(blank=False, null=False) |
50 | numero_comprobante = models.CharField(max_length=300, blank=False, null=True) | 50 | numero_comprobante = models.CharField(max_length=300, blank=False, null=True) |
51 | fecha_pago = models.DateTimeField(blank=False, null=True) | 51 | fecha_pago = models.DateTimeField(blank=False, null=True) |
52 | + edicto = models.ForeignKey(Edicto, on_delete=models.CASCADE) | ||
52 | 53 | ||
53 | class Meta: | 54 | class Meta: |
54 | verbose_name = 'ComprobantePago' | 55 | verbose_name = 'ComprobantePago' |
-
Please register or login to post a comment