Replies: 4 comments 1 reply
-
Hey, I'm not really sure about this particular error but I think the m2m needs a bit of modifications in the forms.py area. I'll take a look into this over the weekend. |
Beta Was this translation helpful? Give feedback.
-
Awesome work on this package, thank you so much 🙏 I am also interested in this! Are there any test cases / examples you could point me towards @aminalaee ? |
Beta Was this translation helpful? Give feedback.
-
Yeah sorry I should have updated my comment 😳 I realized shortly after that the issue was actually this one fastapi/sqlmodel#315 cheers @aminalaee btw- still up in the air but there's a chance I may wind up using this enough to throw a PR or two your way. Specifically may wind up wanting to add a search / text filter to it eventually. Also may try beefing up support for enums. It's not more than a mild inconvenience rn so we'll see! |
Beta Was this translation helpful? Give feedback.
-
Doh! I see this now- looks like maybe it's already got a search https://aminalaee.github.io/sqladmin/api_reference/model_admin/#sqladmin.models.ModelAdmin.column_searchable_list |
Beta Was this translation helpful? Give feedback.
-
What's the recommended way to use sqladmin with many-to-many relationships with an association table? I have the following models:
It seems that the methods executed from the HTML template do not execute inside a session, which causes errors such as
sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <UserGroup at 0x7fdec0d3e7d0> is not bound to a Session; lazy load operation of attribute 'group' cannot proceed (Background on this error at: https://sqlalche.me/e/14/bhk3)
Is there something I'm missing with m2m relationships?
Beta Was this translation helpful? Give feedback.
All reactions