-
-
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 #292 -- Change admin widgets' JS media ordering #295
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #295 +/- ##
==========================================
+ 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. |
@mardukbp I made an amendment to your patch and moved the behavior to the admin mixin only. Can you double-check if that works for you? |
…oe#295) Select2Mixin now loads admin/js/jquery.init.js, just like the AutocompleteMixin of Django Admin. --------- Co-authored-by: Johannes Maron <[email protected]>
@codingjoe It does not work. Why did not you wait for my reply? Why did you modify my PR, when I had already tested that it solves the problem? Please use my original code. |
Hi there, Don't take this wrong, but I maintain dozens of packages. I don't remember why, I did something 3 weeks ago. Upon reviewing your code again, it wasn't something I would have merged. You modified the base widget that shouldn't implement anything specific to Django's admin. Which you may have noticed because all tests related to that were failing. Please check if you are using the admin mixin, that is required to make select2 work in Django's admin. If the error persists, please open a new ticket. Kindly, |
Thank you for your prompt and careful reply. I appreciate that you take the time to respond quickly. I agree that my modification was not done at the right place and the right place is the AdminMixin. I think that as a maintainer you should merge PRs only when there's convincing evidence that they solve a problem and not rush to get rid of open PRs. Now we have to start all over again with another issue and another PR, which costs both of us time. In other words, I appreciate your dilligence, but don't be too efficient :) |
It turns out the fix works as expected. In all my projects I use Jazzmin, which activates Select2 for all select widgets and it interferes with django-select2. My apologies for not doing proper testing before commenting. |
Select2Mixin now loads admin/js/jquery.init.js, just like the AutocompleteMixin of Django Admin. Fixes #292.