Changes between Version 2 and Version 3 of Ticket #5331, comment 4


Ignore:
Timestamp:
Feb 15, 2011, 11:33:23 AM (14 years ago)
Author:
Adam Alton

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5331, comment 4

    v2 v3  
    33It needs a 'formfield' method adding to django.db.models.URLField...
    44
     5{{{
    56#django/db/models/fields/__init__.py
    6 
    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)
     7class 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}}}
Back to Top