From: Zygmunt Krynicki Date: Mon, 13 Jun 2011 12:49:23 +0000 (+0200) Subject: Fix tests on django 1.2 X-Git-Tag: release-2.0~27 X-Git-Url: https://git.mdrn.pl/django-pagination.git/commitdiff_plain/5cef3f80baa913c0c2263d2d9e751546b3a72c94?ds=sidebyside;hp=19af5cdf69b55c5bce39f2ca83e12372d395e49c Fix tests on django 1.2 On django 1.2 STATIC_URL is not available by default --- diff --git a/linaro_django_pagination/templatetags/pagination_tags.py b/linaro_django_pagination/templatetags/pagination_tags.py old mode 100755 new mode 100644 index f4ddde7..a8f5e20 --- a/linaro_django_pagination/templatetags/pagination_tags.py +++ b/linaro_django_pagination/templatetags/pagination_tags.py @@ -252,7 +252,7 @@ def paginate(context, window=DEFAULT_WINDOW): pages.extend(differenced) to_return = { 'MEDIA_URL': settings.MEDIA_URL, - 'STATIC_URL': settings.STATIC_URL, + 'STATIC_URL': getattr(settings, "STATIC_URL", None), 'pages': pages, 'page_obj': page_obj, 'paginator': paginator,