Ticket #5331: urlfield.patch

File urlfield.patch, 548 bytes (added by Chris Beaven, 17 years ago)
  • django/newforms/fields.py

     
    408408        value = super(URLField, self).clean(value)
    409409        if value == u'':
    410410            return value
     411        # If no URL scheme given, assume http://
     412        if ':' not in value:
     413            value = 'http://%s' % value
    411414        if self.verify_exists:
    412415            import urllib2
    413416            from django.conf import settings
Back to Top