Enzo Yair

se elimino la paginacion personalizada

... ... @@ -8,7 +8,6 @@ from datetime import datetime
from .models import Edicto, Precio
from .serializer import EdictoSerializer, PrecioSerializer
from .filters import EdictoFilter, PrecioFilter
from .pagination import CustomPagination
from .permissions import IsAdminOrAuthorized
from .utils import contador
... ... @@ -27,7 +26,6 @@ class EdictoViewSet(mixins.CreateModelMixin,
queryset = Edicto.objects.all()
ordering_fields = ('usuario',)
ordering = 'usuario'
pagination_class = CustomPagination
def perform_create(self, serializer):
edicto = self.request.data.get('cuerpo_edicto')
... ... @@ -56,4 +54,3 @@ class PrecioViewSet(viewsets.ReadOnlyModelViewSet):
ordering_fields = ('usuario', )
ordering = 'usuario'
queryset = Precio.objects.all()
pagination_class = CustomPagination
... ...
from rest_framework.pagination import PageNumberPagination
class CustomPagination(PageNumberPagination):
page_size = 2
page_size_query_param = 'page_size'
max_page_size = 1000