Created
May 24, 2014 14:33
-
-
Save kevin-brown/9e2d4579cd231f67a2da to your computer and use it in GitHub Desktop.
Fixed DisablePaginationMixin. This needs to be added to your views.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DisablePaginationMixin(object): | |
def get_paginate_by(self, queryset=None): | |
if self.paginate_by_param in self.request.QUERY_PARAMS and \ | |
self.request.QUERY_PARAMS[self.paginate_by_param] == '0': | |
return None | |
return super(DisablePaginationMixin, self).get_paginate_by(queryset) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment