def is_valid_url(message=None):
  if message is None:
    message = lazy_gettext(u'You have to enter a valid URL.')
  def validator(form, value):
    protocol = urlparse(value)[0]
    if not protocol or protocol == 'javascript':
      raise ValidationError(message)
  return validator
Generates a new random, unique nonce to use for authentication.
dataset/ETHPy150Open IanLewis/kay/kay/utils/validators.py/is_valid_url--crossover with--dataset/ETHPy150Open google/grr/grr/server/data_server/auth.py/NonceStore.NewNonce