def extension(url):
  if url:
    path = urlparse.urlparse(url).path
    ext = os.path.splitext(path)[1]
    return ext
  else:
    return None
Returns a securely generated random string.
dataset/ETHPy150Open miklevin/pipulate/common.py/extension--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/utils/crypto.py/get_random_string