diff options
| author | Tom Christie | 2012-11-16 22:45:57 +0000 | 
|---|---|---|
| committer | Tom Christie | 2012-11-16 22:45:57 +0000 | 
| commit | 31f01bd6315f46bf28bb4c9c25a5298785fc4fc6 (patch) | |
| tree | 8f2c0ef593402a23118d71c7f81734c30ef5d2cc /rest_framework/mixins.py | |
| parent | 9973cf329a2133a900256b53236348ef3c870842 (diff) | |
| download | django-rest-framework-31f01bd6315f46bf28bb4c9c25a5298785fc4fc6.tar.bz2 | |
Polishing to page size query parameters & more docs
Diffstat (limited to 'rest_framework/mixins.py')
| -rw-r--r-- | rest_framework/mixins.py | 13 | 
1 files changed, 0 insertions, 13 deletions
| diff --git a/rest_framework/mixins.py b/rest_framework/mixins.py index 0da4c2cc..53c4d984 100644 --- a/rest_framework/mixins.py +++ b/rest_framework/mixins.py @@ -7,7 +7,6 @@ which allows mixin classes to be composed in interesting ways.  from django.http import Http404  from rest_framework import status  from rest_framework.response import Response -from rest_framework.settings import api_settings  class CreateModelMixin(object): @@ -40,7 +39,6 @@ class ListModelMixin(object):      Should be mixed in with `MultipleObjectAPIView`.      """      empty_error = u"Empty list and '%(class_name)s.allow_empty' is False." -    page_size_kwarg = api_settings.PAGE_SIZE_KWARG      def list(self, request, *args, **kwargs):          queryset = self.get_queryset() @@ -66,17 +64,6 @@ class ListModelMixin(object):          return Response(serializer.data) -    def get_paginate_by(self, queryset): -        if self.page_size_kwarg is not None: -            page_size_kwarg = self.request.QUERY_PARAMS.get(self.page_size_kwarg) -            if page_size_kwarg: -                try: -                    page_size = int(page_size_kwarg) -                    return page_size -                except ValueError: -                    pass -        return super(ListModelMixin, self).get_paginate_by(queryset) -  class RetrieveModelMixin(object):      """ | 
