X-Git-Url: https://git.mdrn.pl/django-pagination.git/blobdiff_plain/4d9de045120fb7f08675e52a5ed4b3e55dc2c7ef..refs/heads/master:/fnp_django_pagination/middleware.py diff --git a/fnp_django_pagination/middleware.py b/fnp_django_pagination/middleware.py index bb33c4a..9d2d9f4 100644 --- a/fnp_django_pagination/middleware.py +++ b/fnp_django_pagination/middleware.py @@ -28,20 +28,15 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -try: - from django.utils.deprecation import MiddlewareMixin -except ImportError: - # Django < 1.10 - MiddlewareMixin = object +from django.utils.deprecation import MiddlewareMixin -def get_page(self, suffix): +def get_page(self, suffix=''): """ A function which will be monkeypatched onto the request to get the current integer representing the current page. """ try: - # REQUEST is deprecated as of Django 1.7. key = 'page%s' % suffix value = self.POST.get(key) if value is None: