def get_url_field():
 from django.forms import URLField
 field = URLField()
 try:
  field = URLField(verify_exists=False)
 except TypeError as e:
  pass
 return field

def get_url_field ( ) : from django . forms import URLField field = URLField ( ) try : field = URLField ( verify_exists = False ) except TypeError as e : pass return field
this should be compatible with both django 1 .