-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Fix #297 -- Add Django admin' inline formset support #300
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #300 +/- ##
==========================================
+ Coverage 98.21% 98.23% +0.02%
==========================================
Files 7 7
Lines 280 284 +4
==========================================
+ Hits 275 279 +4
Misses 5 5 ☔ View full report in Codecov by Sentry. |
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.
Hi there,
Thanks for the contribution. I wrote the Django integration too, so we can borrow some learnings and reduce the code a little.
Best
Joe
@codingjoe the above code looks good to go, wondering when can it be reviewed and merged as a couple of my prod websites are affected, could wait a couple days before i create a fork myself and use that in my repos |
I left a comment. Once it's resolved I am happy to release this. |
Co-authored-by: Johannes Maron <[email protected]>
Thanks for your suggestion @codingjoe. I tested it with my Django project and everything works. I apologize for taking so long to update my PR. |
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.
Excellent!
As described in #249 and #297 django-select2 does not currently work with selects added dynamically in the Django admin.
The solution was implemented in #249 and all credit should go to Jurrian Tromp. I only added a small correction:
to only remove
.select2-container
when it is a sibling of.django-select2
. Otherwise the wrong.select2-container
might get deleted.