Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Marta Miranda
/
boletin_api
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Enzo Yair
2023-10-18 11:49:43 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a31d5b2de2d4a364e8b70a882209421dde7398f1
a31d5b2d
1 parent
97b74a83
se agrega id en ComprobanteFilter y el id del comprobante en el ordenamiento
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
project/apps/edicto/api.py
project/apps/edicto/filters.py
project/apps/edicto/api.py
View file @
a31d5b2
...
...
@@ -65,7 +65,7 @@ class ComprobanteViewSet(mixins.UpdateModelMixin,
queryset
=
ComprobantePago
.
objects
.
all
()
filter_backends
=
(
DjangoFilterBackend
,
filters
.
OrderingFilter
)
filter_class
=
ComprobanteFilter
ordering_fields
=
(
'monto_descuento'
,
'monto_total'
,
'fecha_pago'
)
ordering_fields
=
(
'
id'
,
'
monto_descuento'
,
'monto_total'
,
'fecha_pago'
)
ordering
=
'id'
...
...
project/apps/edicto/filters.py
View file @
a31d5b2
...
...
@@ -39,13 +39,13 @@ class PrecioFilter(filters.FilterSet):
class
ComprobanteFilter
(
filters
.
FilterSet
):
edicto_id
=
filters
.
NumberFilter
(
field_name
=
'edicto__id'
)
class
Meta
:
model
=
ComprobantePago
fields
=
{
'monto_descuento'
:
[
'contains'
],
'monto_total'
:
[
'contains'
],
'edicto'
:
[
'exact'
],
'fecha_pago'
:
[
'exact'
],
'numero_comprobante'
:
[
'exact'
],
}
...
...
Please
register
or
login
to post a comment