Changes between Version 2 and Version 3 of Ticket #5331, comment 4
- Timestamp:
- Feb 15, 2011, 11:33:23 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5331, comment 4
v2 v3 3 3 It needs a 'formfield' method adding to django.db.models.URLField... 4 4 5 {{{ 5 6 #django/db/models/fields/__init__.py 6 7 class URLField:8 #snip9 def formfield(self, **kwargs):10 if 'form_class' not in kwargs:11 kwargs['form_class'] = forms.URLField12 return super(URLField, self).formfield(**kwargs) 7 class URLField: 8 #snip 9 def formfield(self, **kwargs): 10 if 'form_class' not in kwargs: 11 kwargs['form_class'] = forms.URLField 12 return super(URLField, self).formfield(**kwargs) 13 }}}