title: How can I get a rewritten render_to_response to get a json in django with the least changes to the whole project
body: <p>I now receive a task, that is developing a native app on phone based on a web project. So I think the best way to communicate between server and client is using json.</p>
  
  <p>Then I need all the response give me a result of json format. But now in the web project, almost every view use <code>render_to_response</code> like the following:</p>
  
  <pre><code>ctxt = RequestContext(request,*args)
  return render_to_response('XXX.html',ctxt)
  </code></pre>
  
  <p>Then I want rewrite render_to_response like below, so I need not to change every one to a new function:</p>
  
  <pre><code>def render_to_response:
    return new HttpResponse(simplejson.dumps(*args), mimetype='text/json'))
  </code></pre>
  
  <p>Obviously, I can change the source code in django, but it's not a practicable method. Because other project also need use it.</p>
  
  <p>Or I can write a new module with the <code>render_to_response</code> function, and import this after  </p>
  
  <pre><code>from django.shortcuts import render_to_response
  </code></pre>
  
  <p>But I am not sure if this is possible.</p>
  
  <p>If this can work, I also need to add this import into every <code>.py</code> files which is still a huge work.</p>
  
  <p>So I want a best way with the least changes to the whole project.</p>