Enzo Yair

correcion de filtros en la vista

@@ -7,7 +7,6 @@ from datetime import datetime @@ -7,7 +7,6 @@ from datetime import datetime
7 7
8 from .models import Edicto, Precio 8 from .models import Edicto, Precio
9 from .serializer import EdictoSerializer, PrecioSerializer 9 from .serializer import EdictoSerializer, PrecioSerializer
10 -from usuario.serializers import UsuarioListaSerializer  
11 from .filters import EdictoFilter, PrecioFilter 10 from .filters import EdictoFilter, PrecioFilter
12 from .pagination import CustomPagination 11 from .pagination import CustomPagination
13 from .permissions import IsAdminOrAuthorized 12 from .permissions import IsAdminOrAuthorized
@@ -27,7 +26,7 @@ class EdictoViewSet(mixins.CreateModelMixin, @@ -27,7 +26,7 @@ class EdictoViewSet(mixins.CreateModelMixin,
27 filter_backends = (DjangoFilterBackend, filters.OrderingFilter) 26 filter_backends = (DjangoFilterBackend, filters.OrderingFilter)
28 filterset_class = EdictoFilter 27 filterset_class = EdictoFilter
29 queryset = Edicto.objects.all() 28 queryset = Edicto.objects.all()
30 - ordering_fields = ('usuario__usuario',) 29 + ordering_fields = ('usuario',)
31 ordering = 'usuario' 30 ordering = 'usuario'
32 pagination_class = CustomPagination 31 pagination_class = CustomPagination
33 32