Test up to Django 3.0. Drop Python 3-3.4.
[django-pagination.git] / fnp_django_pagination / middleware.py
index 02f8e7c..4036511 100644 (file)
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-from django.utils.deprecation import MiddlewareMixin
+try:
+    from django.utils.deprecation import MiddlewareMixin
+except ImportError:
+    # Django < 1.10
+    MiddlewareMixin = object
 
 
-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.