Skip to content

Instantly share code, notes, and snippets.

@kyleterry
Created August 15, 2011 21:14
Show Gist options
  • Save kyleterry/1147878 to your computer and use it in GitHub Desktop.
Save kyleterry/1147878 to your computer and use it in GitHub Desktop.
if 'request' in context:
getvars = context['request'].GET.copy()
if 'page' in getvars:
del getvars['page']
if len(getvars.keys()) > 0:
to_return['getvars'] = "&%s" % getvars.urlencode()
else:
to_return['getvars'] = ''
return to_return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment