title: Return json file in a view
body: <p>In a view I create new file with:</p>
  
  <pre><code>sys.stdout = open(backup_name, 'w')
  call_command('dumpdata')
  </code></pre>
  
  <p>How can I now return this file to user?</p>
  
  <p>I tried to change mimetype in HttpResponse to 'application/json' but how can I add file content to response?</p>
  
  <p>Or maybe there is other way to return file?</p>
  
  <p>.</p>