Enzo Yair

se elimino la paginacion personalizada

@@ -8,7 +8,6 @@ from datetime import datetime @@ -8,7 +8,6 @@ from datetime import datetime
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 .filters import EdictoFilter, PrecioFilter 10 from .filters import EdictoFilter, PrecioFilter
11 -from .pagination import CustomPagination  
12 from .permissions import IsAdminOrAuthorized 11 from .permissions import IsAdminOrAuthorized
13 from .utils import contador 12 from .utils import contador
14 13
@@ -27,7 +26,6 @@ class EdictoViewSet(mixins.CreateModelMixin, @@ -27,7 +26,6 @@ class EdictoViewSet(mixins.CreateModelMixin,
27 queryset = Edicto.objects.all() 26 queryset = Edicto.objects.all()
28 ordering_fields = ('usuario',) 27 ordering_fields = ('usuario',)
29 ordering = 'usuario' 28 ordering = 'usuario'
30 - pagination_class = CustomPagination  
31 29
32 def perform_create(self, serializer): 30 def perform_create(self, serializer):
33 edicto = self.request.data.get('cuerpo_edicto') 31 edicto = self.request.data.get('cuerpo_edicto')
@@ -56,4 +54,3 @@ class PrecioViewSet(viewsets.ReadOnlyModelViewSet): @@ -56,4 +54,3 @@ class PrecioViewSet(viewsets.ReadOnlyModelViewSet):
56 ordering_fields = ('usuario', ) 54 ordering_fields = ('usuario', )
57 ordering = 'usuario' 55 ordering = 'usuario'
58 queryset = Precio.objects.all() 56 queryset = Precio.objects.all()
59 - pagination_class = CustomPagination  
1 -from rest_framework.pagination import PageNumberPagination  
2 -  
3 -  
4 -class CustomPagination(PageNumberPagination):  
5 - page_size = 2  
6 - page_size_query_param = 'page_size'  
7 - max_page_size = 1000