django-better-filter-widget
django-better-filter-widget copied to clipboard
Error in using better-filter-widget out of admin
Hello. I've got the following error trying to include the widget in a regular form, outside the admin app:
output = super(BetterFilterWidget, self).render(name, value, attrs, choices)
TypeError: render() takes at most 4 arguments (5 given)
Full stack trace:
https://gist.github.com/erasmodanarni/ad77549ac18f36f8999cc57b94482c66
Here is how I used it:
class SubazioniForm(forms.ModelForm):
class Meta:
model = Subazioni
fields = '__all__'
widgets = {
'destinatari': BetterFilterWidget(),
}
Any ideas how to proceed further?
Many thanks!
What version of django are you using?
If django 1.10, there a PR to fix this here: https://github.com/ExoticObjects/django-better-filter-widget/pull/7
Looking at it today.
Hi Matt. I'm using 1.10... Thank you for your time!
On Fri, Mar 17, 2017 at 4:13 PM, Matt [email protected] wrote:
If django 1.10, there a PR to fix this here: #7 https://github.com/ExoticObjects/django-better-filter-widget/pull/7
Looking at it today.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ExoticObjects/django-better-filter-widget/issues/8#issuecomment-287381887, or mute the thread https://github.com/notifications/unsubscribe-auth/AYpXqcAMf-t-dvgCVYTshWbrVBlGFrqWks5rmqM0gaJpZM4MgB-j .
I applied the changes, and now I find a javascript error in the html source: "Can't find variable: django"

The appearance of the page is like a standard multiple select field.