title: Downloading files from amazon s3 using django
body: <p>I am new to the <em>Django framework</em>, I was trying to generate a link to download files from <em>Amazon S3</em>. I got this error when I tried to load the template page:</p>
  
  <pre><code>Reverse for 'myapp.views.handles3downloads' with arguments '(u'README.md',)'
  and keyword arguments '{}' not found.
  </code></pre>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>urlpatterns = patterns('',
      url(r'^handles3downloads/(\d+)/$', handles3downloads),
  )
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>def handles3downloads(request, fname):
      bucket_name = 'bucketname'
      key = s.get_bucket(bucket_name).get_key(fname)
      dfilename = key.get_contents_to_filename(fname)
  
      wrapper = HttpResponse(file(dfilename))
      response = HttpResponse(wrapper, content_type='text/plain')
      response['Content-Length'] = os.path.getsize(dfilename)
      return response
  </code></pre>
  
  <p><strong>template file</strong></p>
  
  <pre><code>&lt;a href="{% url 'myapp.views.handles3downloads' sfile.linkUrl %}"&gt;{{sfile.linkUrl}}&lt;/a&gt;
  </code></pre>
  
  <p>I looked at some of the solutions with similar errors but it didn't help me. Can anyone help me out please.</p>
  
  <p>Advance thanks</p>