title: Django is downloading file instead of displaying it
body: <p>I am trying to display an HTML file from my Django code. but my file is getting downloaded instead of displaying.</p>
  
  <p>Following is my code:</p>
  
  <pre><code>@api_view(['GET'])
  
  def download_y9cfile1(request, file_name):  
  
      filePath = CommonUtils.get_absolute_file_path('app', 'static', 'generated', 'HTML' , file_name)
      return render(request, file_name)
  </code></pre>