def url_basename(url, content_type):
    """Return best-guess basename from URL and content-type.

    >>> from django_downloadview.utils import url_basename

    If URL contains extension, it is kept as-is.

    >>> print(url_basename(u'/path/to/somefile.rst', 'text/plain'))
    somefile.rst

    """
    return url.split('/')[-1]
