Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

stephane opened this issue Nov 9, 2012 · 2 comments
Labels

Comments

@stephane
Copy link
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
Copy link
Owner

@stephane
Please check the latest code in master branch.

@stephane
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants