def redirect_view(request):
 if request.GET:
  from urllib import urlencode
  query = ('?' + urlencode(request.GET, True))
 else:
  query = ''
 return HttpResponseRedirect(('/test_client/get_view/' + query))

def redirect_view ( request ) : if request . GET : from urllib import urlencode query = ( '?' + urlencode ( request . GET , True ) ) else : query = '' return HttpResponseRedirect ( ( '/test_client/get_view/' + query ) )
redirect all requests that come here to an api call with a view parameter .