Commits

Mark Lavin committed 5cac2de

Update example project to not use removed fields.

  • Participants
  • Parent commits b5d4da3

Comments (0)

Files changed (2)

example/core/admin.py

 
 
 class FarmAdminForm(forms.ModelForm):
-    owner = selectable.AutoComboboxSelectField(lookup_class=OwnerLookup, allow_new=True)
+    owner = selectable.AutoCompleteSelectField(lookup_class=OwnerLookup, allow_new=True)
 
     class Meta(object):
         model = Farm

example/core/forms.py

         label='Select a fruit (AutoCompleteField which allows new items)',
         required=False,
     )
-    # AutoComboboxSelectField (no new items)
-    comboboxselect = selectable.AutoComboboxSelectField(
+    # AutoCompleteSelectField (no new items)
+    comboboxselect = selectable.AutoCompleteSelectField(
         lookup_class=FruitLookup,
-        label='Select a fruit (AutoComboboxSelectField)',
+        label='Select a fruit (AutoCompleteSelectField with combobox)',
         required=False,
+        widget=selectable.AutoComboboxSelectWidget
     )
-    # AutoComboboxSelectField (allows new items)
-    newcomboboxselect = selectable.AutoComboboxSelectField(
+    # AutoComboboxSelect (allows new items)
+    newcomboboxselect = selectable.AutoCompleteSelectField(
         lookup_class=FruitLookup,
         allow_new=True,
-        label='Select a fruit (AutoComboboxSelectField which allows new items)',
+        label='Select a fruit (AutoCompleteSelectField with combobox which allows new items)',
         required=False,
+        widget=selectable.AutoComboboxSelectWidget
     )
     # AutoCompleteSelectMultipleField
     multiautocompleteselect = selectable.AutoCompleteSelectMultipleField(
         required=False,
     )
     # AutoComboboxSelectMultipleField
-    multicomboboxselect = selectable.AutoComboboxSelectMultipleField(
+    multicomboboxselect = selectable.AutoCompleteSelectMultipleField(
         lookup_class=FruitLookup,
-        label='Select a fruit (AutoComboboxSelectMultipleField)',
+        label='Select a fruit (AutoCompleteSelectMultipleField with combobox)',
         required=False,
+        widget=selectable.AutoComboboxSelectMultipleWidget
     )
 
 
 class ChainedForm(forms.Form):
-    city = selectable.AutoComboboxSelectField(
+    city = selectable.AutoCompleteSelectField(
         lookup_class=CityLookup,
         label='City',
         required=False,
+        widget=selectable.AutoComboboxSelectWidget
     )
     state = USStateField(widget=USStateSelect, required=False)