diff --git a/select2/fields.py b/select2/fields.py index 144976a..2ad68e3 100644 --- a/select2/fields.py +++ b/select2/fields.py @@ -133,13 +133,12 @@ def __init__(self, search_field=None, case_sensitive=False, *args, **kwargs): self.choice_iterator_cls = kwargs.pop('choice_iterator_cls', self.choice_iterator_cls) super(Select2ModelFieldMixin, self).__init__(*args, **kwargs) - def _get_choices(self): + @Select2FieldMixin.choices.getter + def choices(self): if hasattr(self, '_choices'): return self._choices return self.choice_iterator_cls(self) - choices = property(_get_choices, forms.ChoiceField._set_choices) - class ModelChoiceField(Select2ModelFieldMixin, forms.ModelChoiceField):