[Answered ]-Need to group the apps under labels for the sidebar of django admin using the package jazzmin

1👍

Create a custom middleware and add it in your settings file.

from admin_reorder.middleware import ModelAdminReorder


class ModelAdminReorderWithNav(ModelAdminReorder):

    def process_template_response(self, request, response):

        available_apps = response.context_data.get('available_apps')

        response.context_data['app_list'] = available_apps

        response = super().process_template_response(request, response)

        response.context_data['available_apps'] = response.context_data[

            'app_list'

        ]

        return response
👤Anoop

0👍

There is an issue with the current reorder package – it looks like it is not maintained. I had exactly the same issue but I found that a PR exists, that solves this issue.

You can navigate to the issue and fetch the lib through a github repo, instead of using it directly under the package name.

Hope it helps.

Leave a comment