def isValidImageURL(field_data, all_data):
    uc = URLMimeTypeCheck(('image/jpeg', 'image/gif', 'image/png'))
    try:
        uc(field_data, all_data)
    except URLMimeTypeCheck.InvalidContentType:
        raise ValidationError, gettext("The URL %s does not point to a valid image.") % field_data
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/lib/django/django/core/validators.py/isValidImageURL/original