Skip to content
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

treetable.js not loaded correctly due to django.jQuery not defined (js load order) #177

Open
erny opened this issue Jun 2, 2023 · 0 comments

Comments

@erny
Copy link

erny commented Jun 2, 2023

With Django 3.2.15, editor/jquery.treeTable.js seems to be loaded before admin/js/jquery.init.js. (This is caused by django's Media merging algorithm.

To fix it, jQuery and jquery.init must be defined as depedencies. This can be done by prepending them in js list in editor/tree_editor.py:

class Media:
     ...
     extra = '' if django_settings.DEBUG else '.min'
     js = ['admin/js/vendor/jquery/jquery%s.js' % extra, 'admin/js/jquery.init.js', 'editor/jquery.treeTable.js']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant