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-09-12 11:54:45 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9cf1970d26f3a9b5334788242b919f01601a9fde
9cf1970d
1 parent
4cab993c
se agreggo ordenamiento
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
project/apps/edicto/api.py
project/apps/edicto/filters.py
project/apps/edicto/api.py
View file @
9cf1970
...
...
@@ -15,7 +15,6 @@ from .utils import contador
class
EdictoViewSet
(
mixins
.
CreateModelMixin
,
mixins
.
RetrieveModelMixin
,
mixins
.
UpdateModelMixin
,
mixins
.
DestroyModelMixin
,
mixins
.
ListModelMixin
,
viewsets
.
GenericViewSet
):
...
...
@@ -25,7 +24,8 @@ class EdictoViewSet(mixins.CreateModelMixin,
filterset_class
=
EdictoFilter
queryset
=
Edicto
.
objects
.
all
()
ordering_fields
=
(
'usuario'
,)
ordering
=
'usuario'
ordering
=
(
'fecha_publicacion'
,
'id'
,)
lookup_field
=
'uuid'
def
perform_create
(
self
,
serializer
):
edicto
=
self
.
request
.
data
.
get
(
'cuerpo_edicto'
)
...
...
project/apps/edicto/filters.py
View file @
9cf1970
...
...
@@ -11,7 +11,7 @@ class EdictoFilter(filters.FilterSet):
model
=
Edicto
fields
=
{
'usuario'
:
[
'exact'
],
'estado'
:
[
'exact'
],
'id'
:
[
'exact'
],
'
uu
id'
:
[
'exact'
],
}
...
...
Please
register
or
login
to post a comment