Enzo Yair

se agrego el orden

@@ -23,8 +23,9 @@ class EdictoViewSet(mixins.CreateModelMixin, @@ -23,8 +23,9 @@ class EdictoViewSet(mixins.CreateModelMixin,
23 permission_classes = [IsAuthenticated, ] 23 permission_classes = [IsAuthenticated, ]
24 filter_backends = (DjangoFilterBackend, filters.OrderingFilter) 24 filter_backends = (DjangoFilterBackend, filters.OrderingFilter)
25 filterset_class = EdictoFilter 25 filterset_class = EdictoFilter
26 - queryset = Edicto.objects.all().order_by('id') 26 + queryset = Edicto.objects.all()
27 ordering_fields = ('usuario', 'estado', 'fecha_publicacion', 'id',) 27 ordering_fields = ('usuario', 'estado', 'fecha_publicacion', 'id',)
  28 + ordering = 'id'
28 29
29 def perform_create(self, serializer): 30 def perform_create(self, serializer):
30 edicto = self.request.data.get('cuerpo_edicto') 31 edicto = self.request.data.get('cuerpo_edicto')