heroku-python / dj-static

DEPRECATED - use WhiteNoise instead!
http://kennethreitz.org/introducing-dj-static/
BSD 2-Clause "Simplified" License
511 stars 74 forks source link

Properly invoke StaticFilesHandler #19

Closed goldibex closed 10 years ago

goldibex commented 10 years ago

Currently dj-static uses an inappropriate signature for creating a new StaticFilesHandler, causing it to crash out with the following error:

[ERROR] Error handling request
Traceback (most recent call last):
   File "venv/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 126, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
   File "venv/lib/python2.7/site-packages/dj_static.py", line 67, in __call__
     return self.debug_cling(environ, start_response)
   File "venv/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 72, in __call__
     return self.application(environ, start_response)
 TypeError: 'str' object is not callable

This patch corrects that.