#NEWLINE# def render( self , context ) : #NEWLINE# #INDENT# 'Return querystring part of URI\n        >>> p = Page("5")\n        >>> p.render({\'querystring\': {}})\n        u\'?page=5\'\n        >>> p.render({\'querystring\': {\'sort\':\'id:1\'}})\n        u\'?sort=id:1&page=5\'\n        ' #NEWLINE# querystring = context . get ( 'querystring' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# if isinstance ( querystring , QueryDict ) : #NEWLINE# #INDENT# querystring = querystring . dict ( ) #NEWLINE# #UNINDENT# page_obj = context . get ( 'page_obj' ) #NEWLINE# if ( page_obj is None ) : #NEWLINE# #INDENT# querystring [ 'page' ] = unicode ( self . page ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . page == 'previous' ) : #NEWLINE# #INDENT# querystring [ 'page' ] = str ( page_obj . previous_page_number ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . page == 'next' ) : #NEWLINE# #INDENT# querystring [ 'page' ] = str ( page_obj . next_page_number ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# querystring [ 'page' ] = str ( context . get ( self . page ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return ( '?' + '&' . join ( [ '=' . join ( k ) for k in querystring . items ( ) ] ) )