From: Radek Czajka Date: Wed, 25 Sep 2019 11:22:24 +0000 (+0200) Subject: Fix for Django < 1.10. X-Git-Tag: 2.2.4 X-Git-Url: https://git.mdrn.pl/django-pagination.git/commitdiff_plain/4d9de045120fb7f08675e52a5ed4b3e55dc2c7ef?ds=sidebyside;hp=c32098c13826bb1b6f3781bfae7080d3fe9e03ff Fix for Django < 1.10. --- diff --git a/fnp_django_pagination/__init__.py b/fnp_django_pagination/__init__.py index ec778ac..fe60da6 100644 --- a/fnp_django_pagination/__init__.py +++ b/fnp_django_pagination/__init__.py @@ -34,4 +34,4 @@ tools throughout a django application. """ -__version__ = (2, 2, 3, "final", 0) +__version__ = (2, 2, 4, "final", 0) diff --git a/fnp_django_pagination/middleware.py b/fnp_django_pagination/middleware.py index 02f8e7c..bb33c4a 100644 --- a/fnp_django_pagination/middleware.py +++ b/fnp_django_pagination/middleware.py @@ -28,7 +28,11 @@ # (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):