def validate_next_url(next_url):
 if next_url.startswith('//'):
  return False
 if (not ((next_url[0] == '/') or next_url.startswith(settings.DOMAIN) or next_url.startswith(settings.CAS_SERVER_URL) or next_url.startswith(settings.MFR_SERVER_URL))):
  return False
 return True

def validate_next_url ( next_url ) : if next_url . startswith ( '//' ) : return False if ( not ( ( next_url [ 0 ] == '/' ) or next_url . startswith ( settings . DOMAIN ) or next_url . startswith ( settings . CAS_SERVER_URL ) or next_url . startswith ( settings . MFR_SERVER_URL ) ) ) : return False return True
non-view helper function that checks next_url .