Skip to content

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

stephane opened this Issue Nov 9, 2012 · 2 comments

2 participants

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.


Please check the latest code in master branch.


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
Something went wrong with that request. Please try again.