title: Django static files templatetags.static
body: <p>I am trying to open a json file in python. It is in a directory called json in static directory of my app. I configured the static files as per the given documentation. </p>
  
  <p>But I get this error on opening files in python using <code>open()</code> function</p>
  
  <pre><code>def send(request):
    file = static('accounts/json/credentials.json')
    f = open(file, "r")
    return HttpResponse("click here &lt;a href='" + file + "'&gt; asd&lt;/a&gt;")
  </code></pre>
  
  <p>The above code generates a <code>FileNotFoundError</code></p>
  
  <p><code>No such file or directory: '/static/accounts/json/credentials.json'</code></p>
  
  <p>I also used this code </p>
  
  <pre><code>def send(request):
    file = static('accounts/json/credentials.json')
    return HttpResponse("click here &lt;a href='" + file + "'&gt; asd&lt;/a&gt;")
  </code></pre>
  
  <p>The above code successfully gave me the response. And On clicking the link <code>asd</code> it is working fine and opens the JSON file.</p>
  
  <p>I have googled a bit and also went through few stackoverflow questions but not sure what the actual error is, Can anyone help me in finding out. 
  Thanks</p>