Implements zyga/django-pagination#22