Marta Miranda

Merge branch 'fix/filtros_ordenamiento' into 'develop'

se agreggo ordenamiento



See merge request !39
... ... @@ -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')
... ...
... ... @@ -11,7 +11,7 @@ class EdictoFilter(filters.FilterSet):
model = Edicto
fields = {'usuario': ['exact'],
'estado': ['exact'],
'id': ['exact'],
'uuid': ['exact'],
}
... ...