Ticket #7244: 7244.patch

File 7244.patch, 1.9 KB (added by Collin Grady, 16 years ago)
  • django/forms/models.py

     
    463463    }
    464464
    465465    def __init__(self, queryset, empty_label=u"---------", cache_choices=False,
    466                  required=True, widget=Select, label=None, initial=None,
     466                 required=True, widget=None, label=None, initial=None,
    467467                 help_text=None, *args, **kwargs):
    468468        self.empty_label = empty_label
    469469        self.cache_choices = cache_choices
     
    523523
    524524class ModelMultipleChoiceField(ModelChoiceField):
    525525    """A MultipleChoiceField whose choices are a model QuerySet."""
     526    widget = SelectMultiple
    526527    hidden_widget = MultipleHiddenInput
    527528    default_error_messages = {
    528529        'list': _(u'Enter a list of values.'),
     
    531532    }
    532533
    533534    def __init__(self, queryset, cache_choices=False, required=True,
    534                  widget=SelectMultiple, label=None, initial=None,
     535                 widget=None, label=None, initial=None,
    535536                 help_text=None, *args, **kwargs):
    536537        super(ModelMultipleChoiceField, self).__init__(queryset, None,
    537538            cache_choices, required, widget, label, initial, help_text,
  • django/forms/fields.py

     
    773773
    774774class FilePathField(ChoiceField):
    775775    def __init__(self, path, match=None, recursive=False, required=True,
    776                  widget=Select, label=None, initial=None, help_text=None,
     776                 widget=None, label=None, initial=None, help_text=None,
    777777                 *args, **kwargs):
    778778        self.path, self.match, self.recursive = path, match, recursive
    779779        super(FilePathField, self).__init__(choices=(), required=required,
Back to Top