Reputation: 810
I'm trying to create migrations of a project which uses Rest Framework pagination.
But I'm getting error as Attribution error: 'module' object has no attribute BasePaginationSerializer
. I have tried uninstalling-resinstalling the said versions of Python, Django and RestFramework. But I still get that error.
Here's the screenshot of terminal showing error.
Here's a chunk of the code present in paginator.py
import urlparse
from django.core.paginator import EmptyPage, Page, PageNotAnInteger, Paginator
from django.utils.http import urlencode
from rest_framework import serializers, pagination
class CustomPaginationSerializer(pagination.BasePaginationSerializer):#Here it shows the error.
meta = MetaSerializer(source='*')
results_field = 'objects'
Can someone help me out in getting this issue resolved?
Info: - Here's the project which I'm trying to build. https://github.com/mozilla/zamboni
Upvotes: 1
Views: 219
Reputation: 3940
Django Rest Framework
doesn't provide anything like BasePaginationSerializer
, that's why you're getting an error - because it doesn't exist. You probably want to use BasePagination
Upvotes: 2