Fix tests on django 1.2
authorZygmunt Krynicki <zygmunt.krynicki@linaro.org>
Mon, 13 Jun 2011 12:49:23 +0000 (14:49 +0200)
committerZygmunt Bazyli Krynicki <Zygmunt Krynicki zygmunt.krynicki@linaro.org>
Mon, 13 Jun 2011 12:49:23 +0000 (14:49 +0200)
On django 1.2 STATIC_URL is not available by default

linaro_django_pagination/templatetags/pagination_tags.py [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index f4ddde7..a8f5e20
@@ -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,