facebook/tornado — pull request #452 by birknilson (2012-02-02 19:49:33+00:00)
Title: Ability to disable/enable URL versioning in static_url

This pull request solves the request found in #447.

I am unsure though whether this solution is better than solving the issue via a custom static handler when needed. Especially, since the 2.2 version of tornado introduced the ``StaticFileHandler.get_version`` method. With a custom handler it is easy to achieve the same behavior with code similar to:

```python
class MyStaticFileHandler(tornado.web.StaticFileHandler):
@classmethod
def get_version(cls, settings, path):
return None
```

This would work since the query string containing the version is not appended to the static URL in case the retrieved version is considered empty.

The case against introducing support for this directly in ``RequestHandler.static_url`` is that it only passes it forward to ``StaticFileHandler.make_static_url``. Also having both ``include_host`` and ``include_version`` as parameters might arguably introduce too many custom scenarios to be handled by the generic implementation.