-
Notifications
You must be signed in to change notification settings - Fork 89
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
Order of Jazzmin Installed Apps and Tabular Inline Editing of Foreign Keys #42
Comments
Update - I'll start again. Hopefully clearer.
The select2 is non-functional - clicks do nothing. This a FK within an inline. Where "Add another MODELNAME" has been clicked to expose this capability. A Select2 that already has content in a Change page works fine. Only Select2 in an inline is broken where there is no current content. The row of hyphens ------ . Console shows this when a Select2 is failing.
Can't even guess what would cause that. |
Another Clue. On my production site the same happens when I change the order of jazzmin to make the select2 error. But the order the files are loaded is reversed (timey wimey stuff). So this isn't likely to be the culprit. There are 2 jquery files too - /static/admin/js/vendor/jquery/jquery.js - * jQuery JavaScript Library v3.6.4 That probably isn't the issue but maybe needs attention. |
And here is the code. For a Working Select2 that has content and hence works. And a Add New ModelName version which has no content. UPDATE - just spotted an oddity. Fail has a Select within a Select. <span class="select2 select2-container select2-container--default"
|
I wonder if this is a Jazzmin issue? Or maybe a workaround is to find out why the order in installed_apps is critical. 'jazzmin', # BEFORE erp_framework.admin. Select2 Works BUT Reports App Missing |
This is a weird one.
In https://github.com/RamezIssac/my-shop/blob/main/my_shop/settings.py the installed apps has this.
I have Tabular Inlines with Add Another ModelName.
With the above order of installed apps any ForeignKeys Select2 is inoperable. Clicks do nothing.
By chance on my local settings.py I changed the order of jazzmin as follows just so it was easier to comment out for tests.
On my local setup the Foreign Key Select2 boxes worked normally.
Whether it is worth investigating I'm not sure but a change to my-shop and docs would prevent this odd edge case.
The text was updated successfully, but these errors were encountered: