Can't pass option to select2 w/o giving data_view #11

Closed
stephane opened this Issue Nov 9, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@stephane
Contributor

stephane commented Nov 9, 2012

I didn't find examples in tests which set select2 options.

class FooSelect2Field(django_select2.AutoModelSelect2Field):
    queryset = Foo.objects
    search_fields = ['name__icontains, ]

    station = StationSelect2Field(widget=django_select2.AutoHeavySelect2Widget(select2_options={
        'width': '32em',
        'placeHolder': _(u"Search foo")
    })

will raise an error about missing view so I need to add data_view='django_select2_central_json' to widget init.

@applegrew

This comment has been minimized.

Show comment
Hide comment
@applegrew

applegrew Nov 24, 2012

Owner

@stephane
Please check the latest code in master branch.

Owner

applegrew commented Nov 24, 2012

@stephane
Please check the latest code in master branch.

@stephane

This comment has been minimized.

Show comment
Hide comment
@stephane

stephane Nov 26, 2012

Contributor

OK data_view is not required anymore so now I can report a bug for ignored select options!

Contributor

stephane commented Nov 26, 2012

OK data_view is not required anymore so now I can report a bug for ignored select options!

@stephane stephane closed this Nov 26, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment