#13613: forms.URLField not default ModelForm URLField anymore
--------------------------------+-------------------------------------------
 Reporter:  amadison            |       Owner:  nobody    
   Status:  new                 |   Milestone:            
Component:  Forms               |     Version:  1.2       
 Keywords:  ModelForm URLField  |       Stage:  Unreviewed
Has_patch:  0                   |  
--------------------------------+-------------------------------------------
 Looks like with Changeset 11456 the ModelForm URLField stopped using the
 forms.FormField as it's default form field. Now it just uses a regular
 CharField but adds the validators.URLValidator.

 There are two important things that were lost when this happened.
 1. the ModelForm does not add on the 'http://' if it is not present, so
 'www.google.com' is an invalid url when using a ModelForm, but not a
 regular form.
 2. The error message on an invalid url is now the generic 'Enter a valid
 value.' instead of the more helpful 'Enter a valid URL.'.

 Attached is a diff for making the ModelForm URLField use the default
 forms.URLField again as the docs describe
 [http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#field-types
 here]

 I think this will make the validator run twice, but I think that's
 probably ok.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13613>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to