Cleaning data which is of type URLField
问题 I have a simple URLField in my model link = models.URLField(verify_exists = False, max_length = 225) I would like to strip the leading and trailing spaces from the field. I don't think I can do this in "clean_fieldname" or in the "clean" method. Do I need to sub-class the "URLField" and remove the spaces in to_python method? Is there a better way to do this without any sub-classing? Edited This is my form class StoryForm(forms.ModelForm): title = forms.CharField(max_length=225, error_messages