Showing
5 changed files
with
54 additions
and
3 deletions
@@ -15,7 +15,7 @@ class EdictoViewSet(mixins.CreateModelMixin, | @@ -15,7 +15,7 @@ class EdictoViewSet(mixins.CreateModelMixin, | ||
15 | viewsets.GenericViewSet): | 15 | viewsets.GenericViewSet): |
16 | 16 | ||
17 | serializer_class = EdictoSerializer | 17 | serializer_class = EdictoSerializer |
18 | - permission_classes = [IsAuthenticated] | 18 | + permission_classes = [IsAuthenticated, ] |
19 | filter_backends = (DjangoFilterBackend, filters.OrderingFilter) | 19 | filter_backends = (DjangoFilterBackend, filters.OrderingFilter) |
20 | filterset_class = EdictoFilter | 20 | filterset_class = EdictoFilter |
21 | queryset = Edicto.objects.all() | 21 | queryset = Edicto.objects.all() |
@@ -10,7 +10,6 @@ RECHAZADO = 'rechazado' | @@ -10,7 +10,6 @@ RECHAZADO = 'rechazado' | ||
10 | 10 | ||
11 | STATUS_CHOICE = [ | 11 | STATUS_CHOICE = [ |
12 | (INICIADO, _('iniciado')), | 12 | (INICIADO, _('iniciado')), |
13 | - (PENDIENTE_REVISION, _('pendiente_revision')), | ||
14 | (PENDIENTE_DE_PAGO, _('pendiente_de_pago')), | 13 | (PENDIENTE_DE_PAGO, _('pendiente_de_pago')), |
15 | (PENDIENTE_PAGO_REVISION, _('pendiente_pago_revision')), | 14 | (PENDIENTE_PAGO_REVISION, _('pendiente_pago_revision')), |
16 | (PUBLICADO, _('publicado')), | 15 | (PUBLICADO, _('publicado')), |
project/apps/edicto/migrations/0002_rename_monto_comprobantepago_monto_descuento_and_more.py
0 → 100644
1 | +# Generated by Django 4.1.9 on 2023-09-28 13:17 | ||
2 | + | ||
3 | +from django.db import migrations, models | ||
4 | + | ||
5 | + | ||
6 | +class Migration(migrations.Migration): | ||
7 | + | ||
8 | + dependencies = [ | ||
9 | + ('edicto', '0001_initial'), | ||
10 | + ] | ||
11 | + | ||
12 | + operations = [ | ||
13 | + migrations.RenameField( | ||
14 | + model_name='comprobantepago', | ||
15 | + old_name='monto', | ||
16 | + new_name='monto_descuento', | ||
17 | + ), | ||
18 | + migrations.AddField( | ||
19 | + model_name='comprobantepago', | ||
20 | + name='monto_subtotal', | ||
21 | + field=models.FloatField(), | ||
22 | + preserve_default=False, | ||
23 | + ), | ||
24 | + migrations.AddField( | ||
25 | + model_name='comprobantepago', | ||
26 | + name='monto_total', | ||
27 | + field=models.FloatField(), | ||
28 | + preserve_default=False, | ||
29 | + ), | ||
30 | + migrations.AddField( | ||
31 | + model_name='edicto', | ||
32 | + name='tiene_descuento', | ||
33 | + field=models.BooleanField(default=False, editable=False), | ||
34 | + preserve_default=False, | ||
35 | + ), | ||
36 | + migrations.AddField( | ||
37 | + model_name='precio', | ||
38 | + name='precio_dia', | ||
39 | + field=models.FloatField(max_length=50), | ||
40 | + preserve_default=False, | ||
41 | + ), | ||
42 | + migrations.AlterField( | ||
43 | + model_name='edicto', | ||
44 | + name='estado', | ||
45 | + field=models.CharField(choices=[('iniciado', 'iniciado'), ('pendiente_de_pago', 'pendiente_de_pago'), ('pendiente_pago_revision', 'pendiente_pago_revision'), ('publicado', 'publicado'), ('aprobado', 'aprobado'), ('rechazado', 'rechazado')], default='inciado', max_length=23), | ||
46 | + ), | ||
47 | + ] |
@@ -17,6 +17,7 @@ class Precio(models.Model): | @@ -17,6 +17,7 @@ class Precio(models.Model): | ||
17 | moneda = models.CharField(max_length=50, blank=False, null=False, choices=MONEDA, | 17 | moneda = models.CharField(max_length=50, blank=False, null=False, choices=MONEDA, |
18 | default='peso_argentino') | 18 | default='peso_argentino') |
19 | precio_ejemplar = models.FloatField(max_length=50, blank=False, null=False) | 19 | precio_ejemplar = models.FloatField(max_length=50, blank=False, null=False) |
20 | + precio_dia = models.FloatField(max_length=50, blank=False, null=False) | ||
20 | 21 | ||
21 | class Meta: | 22 | class Meta: |
22 | verbose_name = 'Precio' | 23 | verbose_name = 'Precio' |
@@ -48,6 +49,7 @@ class Edicto(models.Model): | @@ -48,6 +49,7 @@ class Edicto(models.Model): | ||
48 | modificado_por = models.ForeignKey( | 49 | modificado_por = models.ForeignKey( |
49 | Usuario, on_delete=models.CASCADE, related_name='update_edicto', editable=False | 50 | Usuario, on_delete=models.CASCADE, related_name='update_edicto', editable=False |
50 | ) | 51 | ) |
52 | + tiene_descuento = models.BooleanField(editable=False) | ||
51 | 53 | ||
52 | def __str__(self): | 54 | def __str__(self): |
53 | return f"{self.creado_por} - Edicto" | 55 | return f"{self.creado_por} - Edicto" |
@@ -58,7 +60,9 @@ class ComprobantePago(models.Model): | @@ -58,7 +60,9 @@ class ComprobantePago(models.Model): | ||
58 | verbose_name = 'ComprobantePago' | 60 | verbose_name = 'ComprobantePago' |
59 | verbose_name_plural = 'ComprobantesPagos' | 61 | verbose_name_plural = 'ComprobantesPagos' |
60 | 62 | ||
61 | - monto = models.FloatField() | 63 | + monto_subtotal = models.FloatField() |
64 | + monto_total = models.FloatField() | ||
65 | + monto_descuento = models.FloatField() | ||
62 | numero_comprobante = models.CharField(max_length=300, blank=True, null=True) | 66 | numero_comprobante = models.CharField(max_length=300, blank=True, null=True) |
63 | fecha_pago = models.DateTimeField(blank=True, null=True) | 67 | fecha_pago = models.DateTimeField(blank=True, null=True) |
64 | edicto = models.OneToOneField(Edicto, on_delete=models.CASCADE) | 68 | edicto = models.OneToOneField(Edicto, on_delete=models.CASCADE) |
@@ -192,3 +192,4 @@ AUTHENTICATION_BACKENDS = ( | @@ -192,3 +192,4 @@ AUTHENTICATION_BACKENDS = ( | ||
192 | 192 | ||
193 | # Secret Key para Captcha. | 193 | # Secret Key para Captcha. |
194 | SECRET_KEY_CAPTCHA = env.str('SECRET_KEY_CAPTCHA', default="") | 194 | SECRET_KEY_CAPTCHA = env.str('SECRET_KEY_CAPTCHA', default="") |
195 | +SECRET_KEY_CAPTCHA_FRONT = env.str('SECRET_KEY_CAPTCHA_FRONT', default="") |
-
Please register or login to post a comment