Search for subnodes in accordion admin isn't possible
See original GitHub issueSearch for subnodes in accordion admin isn’t possible, because the parent nodes are collapsed and can not be opened.
Model:
class Element(TreeNodeModel): TYPES = Choices('Namespace', 'Class', 'Object') name = models.CharField(max_length=255, blank=False, null=False, unique=True) model_type = models.CharField( choices=TYPES, default=TYPES.Object, max_length=100) treenode_display_field = 'name'
Admin:
@admin.register(models.Element) class ElementAdmin(TreeNodeModelAdmin): # admin.ModelAdmin treenode_accordion = True autocomplete_fields = ['tn_parent'] list_display = ('id', 'model_type', ) search_fields = ['name', 'tn_parent__name'] exclude = ('tn_priority', ) form = TreeNodeForm
No search:

Search for child node:

Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)

Top Related StackOverflow Question
Top, you’re the best 👍
@alexbredo you can install
0.13.0version.ModelAdminoptions are changed,treenode_accordionoption has been replaced bytreenode_display_modesince a new'breadcrumbs'display mode can be used:When there is an active
list_filtero any query string, the display mode will default toTreeNodeModelAdmin.TREENODE_DISPLAY_MODE_BREADCRUMBSto preserve data visualization integrity.