Skip to content

Commit c4b3fdf

Browse files
phoebebrightcodingjoe
authored andcommitted
Add model to AddressForm example
model also seems to be required in widget as shown in test - https://github.com/applegrew/django-select2/blob/master/tests/testapp/forms.py
1 parent 2000395 commit c4b3fdf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/extra.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Lets link two widgets via *dependent_fields*.
3737
queryset=Country.objects.all(),
3838
label=u"Country",
3939
widget=ModelSelect2Widget(
40+
model=Country,
4041
search_fields=['name__icontains'],
4142
)
4243
)
@@ -45,6 +46,7 @@ Lets link two widgets via *dependent_fields*.
4546
queryset=City.objects.all(),
4647
label=u"City",
4748
widget=ModelSelect2Widget(
49+
model=City,
4850
search_fields=['name__icontains'],
4951
dependent_fields={'country': 'country'},
5052
max_results=500,

0 commit comments

Comments
 (0)