def render(self, context):
        querystring = context.get('querystring', {})
        if isinstance(querystring, QueryDict):
            querystring = querystring.dict()
        page_obj = context.get('page_obj')
        if page_obj is None:
            querystring['page'] = unicode(self.page)
        elif self.page == 'previous':
            querystring['page'] = str(page_obj.previous_page_number())
        elif self.page == 'next':
            querystring['page'] = str(page_obj.next_page_number())
        else:
            querystring['page'] = str(context.get(self.page))
        return "?" + "&".join(["=".join(k) for k in querystring.items()])
Return querystring part of URI
dataset/ETHPy150Open kapsiry/sikteeri/membership/templatetags/page.py/Page.render