Convert query.duration (float) to string before passing it to urlencode.

With the release of werkzeug 0.9 the sqlalchemy panel crashes with:

    File ".../site-packages/werkzeug/urls.py", line 387, in url_quote
    for char in bytearray(string):
    TypeError: 'float' object is not iterable

werkzeug's url_encode[_plus] expects a string as first parameter.