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

Django Forms integration #14

Open
markfinger opened this issue Jun 1, 2020 · 0 comments
Open

Django Forms integration #14

markfinger opened this issue Jun 1, 2020 · 0 comments

Comments

@markfinger
Copy link
Contributor

This lib's focus is on solving the UI part of the problem, but in the process we've reimplemented some features that could have been handled by Django's forms. It might be good if the filters accepted a field arg that handled things like name+label declaration, consuming data from the request, validation, errors, etc.

For example

class IndexViewForm(forms.Form):
    str_field = forms.CharField()
    bool_field = forms.BooleanField()

TextFilter(field=IndexViewForm.str_field)
BooleanFilter(field=IndexViewForm.bool_field)

Would probably need to add the form class into the hierarchy somewhere so that it could be bound and wired so that each filter can read field data and cleaned data.

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

No branches or pull requests

1 participant