Closed RandomJo closed 2 years ago
Hi @RandomJo,
Can you try again with the latest master
version (commit 70404bbb0007bd3779476b9ece85ac3856722f6f)? I was unable to reproduce the problem with DEBUG=False, the templates always refer to collapse.js
, not the minified version.
Closing because I can't reproduce the problem
We have run into this. I think i know why, but haven't fixed it yet.
this is how django decides which version of the collapse.js to load: https://github.com/django/django/blob/119f227aa62885f12cd7dd2558a62148d02adbb4/django/contrib/admin/options.py#L2327
Collapse.min.js is actually pre-minified and included in the Django package: https://github.com/django/django/blob/cab36618326524b336517c2c5fd62633916818e0/django/contrib/admin/static/admin/js/collapse.min.js
Since there's no minified version of that file included here, the minified Django collapse.min.js will be picked up instead of the unminified collapse.js here.
and i guess prior to this PR: https://github.com/stephenmcd/mezzanine/commit/95b138a961d5a102cfe79ed792cba1e9b93d134a it would have still worked because it'd load the minified django collapse + the unminified mezzanine collapse still.
Is there an existing issue for this?
Current Behavior
Collapsible sections of the admin aren't working in Mezzanine 5.0.0 when DEBUG = False. They do work as expected when DEBUG = True.
Expected Behavior
I expect to be able to toggle a collapsible fieldset in the admin.
Steps To Reproduce
Environment
Anything else?
For others with this issue, I resolved this temporarily for myself by reverting back to the 5.0.0a1 alpha release.
Before trying this, I also found that I could fix this by overriding the templates/admin/change_form.html with the following: