'Sign a url for imgix\'s secured sources.
Based very heavily on the example code in the docs:
http://www.imgix.com/docs/tutorials/securing-images
Arguments:
* url -- a UrlParser instance of the url to sign.  This object may be
modified by the function, so make a copy beforehand if that is
a concern.
* token -- a string token provided by imgix for request signing
Returns a UrlParser instance with signing parameters.'

def _sign_url(self, url, token):

    signvalue = (token + url.path)
    if url.query_dict:
        signvalue += query_string(url.query_dict)
    signature = hashlib.md5(signvalue).hexdigest()
    url.update_query(s=signature)
    return url
