~netlandish/django-pagination

d6dc739e87296de75a9a644834e050c13875a894 — floguy 16 years ago 598ff78
Fixed bug with extra getvars where an ampersand was always appended.

git-svn-id: https://django-pagination.googlecode.com/svn/trunk@16 7f1efe38-554e-0410-b69d-834cb44da2d5
1 files changed, 4 insertions(+), 1 deletions(-)

M pagination/templatetags/pagination_tags.py
M pagination/templatetags/pagination_tags.py => pagination/templatetags/pagination_tags.py +4 -1
@@ 175,7 175,10 @@ def paginate(context, window=DEFAULT_WINDOW):
            getvars = context['request'].GET.copy()
            if 'page' in getvars:
                del getvars['page']
            to_return['getvars'] = "&%s" % getvars.urlencode()
            if len(getvars.keys()) > 0:
                to_return['getvars'] = "&%s" % getvars.urlencode()
            else:
                to_return['getvars'] = ''
        return to_return
    except KeyError:
        return {}