-
Notifications
You must be signed in to change notification settings - Fork 194
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
Add form-specific functionality to ModelAdmin #97
Conversation
I added support for The implementation is... not the best. I still largely retain the behavior you have implemented, which is to loop over the |
48e85bf
to
0f8641d
Compare
Just added Again, this will definitely need to be refactored in the future (I already implemented a little bit of refactoring of something that was there, i.e. the Regardless, it should be emulating the (high-level) behavior of the Flask-Admin API, and tests are in place and passing. |
Hey, thanks a lot for this. It generally looks very good to me. |
Co-authored-by: Amin Alaee <[email protected]>
✅ I removed most of the ✅ I added coverage for the override of the scaffolding. |
Woo, all checks passed! 🎉 Thanks for all the hard work you've put into this library so far. It was lots of fun to help contribute. This is a really good implementation of an admin panel framework. I plan on making tons of use of this library for my own projects. You might see some more PRs from me in the near future, especially as it pertains to porting more things over from Flask-Admin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the great work @dwreeves 🎉
I really appreciate the effort and all sorts of contributions are welcome :) I'm glad you'll use it and contribute to make it better. |
I added the following attributes to
ModelAdmin
:form
form_base_class
form_args
form_columns
form_excluded_columns
form_overrides
All of these attributes emulate their respective functionality in the Flask-Admin API: https://flask-admin.readthedocs.io/en/latest/api/mod_model/
This PR addresses issue #96.
--
Note that I abstracted out the
get_{x}_columns()
functionality inModelAdmin
. Let me know if you want me to revert this back to being repetitive.As of writing, there is one thing currently missing from my PR: the scaffolding does not make use ofcolumn_labels
. This is something I will hope to finish up soon!Let me know what other changes you want me to make.