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

Peewee ManyToManyField support #35

Open
axsaucedo opened this issue Aug 7, 2016 · 3 comments
Open

Peewee ManyToManyField support #35

axsaucedo opened this issue Aug 7, 2016 · 3 comments

Comments

@axsaucedo
Copy link

Hi,

The ManyToManyField is not supported in wtf-peewee, and hence it is not supported in Flask-Admin as per Issue#1318.

Are there any plans to add this feature?

Thank you

@coleifer
Copy link
Owner

coleifer commented Aug 7, 2016

Possibly. For the trivial case, I guess it wouldn't be that bad, but if the junction table has columns beyond just the two foreign keys, things could get pretty wild.

@axsaucedo
Copy link
Author

Good point.

I believe that in Django, the trivial case is always assumed - any extra fields would be completely ignored, and only the related fields would be taken into account.

If someone wants to modify the extra data from a through table it would be sensible for them to specify the table explicitly.

@z3ugma
Copy link

z3ugma commented May 21, 2023

@coleifer I find myself wanting to support this use case too, is there a way to take a declared model_form and extend it with a custom selectfield?

For example, make a subclass form that inherits from the model_form and adds additional custom fields

I am happy to implement the Flask view method that would take the select field and create the many-to-many relation

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

3 participants