Skip to content

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

@erny

Description

@erny

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']

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions