Enzo Yair

se agreggo ordenamiento

@@ -15,7 +15,6 @@ from .utils import contador @@ -15,7 +15,6 @@ from .utils import contador
15 class EdictoViewSet(mixins.CreateModelMixin, 15 class EdictoViewSet(mixins.CreateModelMixin,
16 mixins.RetrieveModelMixin, 16 mixins.RetrieveModelMixin,
17 mixins.UpdateModelMixin, 17 mixins.UpdateModelMixin,
18 - mixins.DestroyModelMixin,  
19 mixins.ListModelMixin, 18 mixins.ListModelMixin,
20 viewsets.GenericViewSet): 19 viewsets.GenericViewSet):
21 20
@@ -25,7 +24,8 @@ class EdictoViewSet(mixins.CreateModelMixin, @@ -25,7 +24,8 @@ class EdictoViewSet(mixins.CreateModelMixin,
25 filterset_class = EdictoFilter 24 filterset_class = EdictoFilter
26 queryset = Edicto.objects.all() 25 queryset = Edicto.objects.all()
27 ordering_fields = ('usuario',) 26 ordering_fields = ('usuario',)
28 - ordering = 'usuario' 27 + ordering = ('fecha_publicacion', 'id',)
  28 + lookup_field = 'uuid'
29 29
30 def perform_create(self, serializer): 30 def perform_create(self, serializer):
31 edicto = self.request.data.get('cuerpo_edicto') 31 edicto = self.request.data.get('cuerpo_edicto')
@@ -11,7 +11,7 @@ class EdictoFilter(filters.FilterSet): @@ -11,7 +11,7 @@ class EdictoFilter(filters.FilterSet):
11 model = Edicto 11 model = Edicto
12 fields = {'usuario': ['exact'], 12 fields = {'usuario': ['exact'],
13 'estado': ['exact'], 13 'estado': ['exact'],
14 - 'id': ['exact'], 14 + 'uuid': ['exact'],
15 } 15 }
16 16
17 17