Package: django-admin-index
Version:3.1.0Download:https://pypi.python.org/pypi/django-admin-indexSource:https://github.com/maykinmedia/django-admin-indexKeywords:django, admin, dashboardAboutThis extension enables you to group, order and customize the Django admin
index page without too much hassle or visual changes.There are 2 concepts:Application groupsandApplication links. You can
create an application group and add any model to it in the Django admin, underAdmin index. Whether the models are shown to the user, depends on the
regular Django permissions and whether it’s registered in the admin.An application link is simply a URL with a name that you can add to an
application group. It shows as a regular Django model.One final change in the Django admin is the removal of the App lists, that
link to a list of models within an App. This concept became obsolete.InstallationYou can install django_admin_index either via the Python Package Index (PyPI)
or from source.To install usingpip:$pipinstall-Udjango-admin-indexUsageTo use this with your project you need to follow these steps:Adddjango_admin_indexandordered_modeltoINSTALLED_APPSin
your Django project’ssettings.py. Make sure thatdjango_admin_indexcomes beforedjango.contrib.admin:INSTALLED_APPS=("django_admin_index","ordered_model",...,"django.contrib.admin",)Note that there is no dash in the module name, only underscores.Create the database tables by performing a database migration:$pythonmanage.pymigrateadmin_indexGo to the Django admin of your site and look for the “Application groups”
section.ConfigurationThere are optional settings you can add to yoursettings.py:ADMIN_INDEX_SHOW_REMAINING_APPS(defaults toFalse)Show all models that are not added a to anApplication groupin a group
called “Miscellaneous” forstaffusers.NOTE: If noApplication groupsare defined, it will show all models
regardless of this setting.ADMIN_INDEX_SHOW_REMAINING_APPS_TO_SUPERUSERS(defaults toTrue)Show all models that are not added a to anApplication groupin a group
called “Miscellaneous” forsuper usersusers.NOTE: If noApplication groupsare defined, it will show all models
regardless of this setting.ADMIN_INDEX_AUTO_CREATE_APP_GROUP(defaults toFalse)Automaticly creates anApplication group, based on theapp_label, for
all the models that would be in the “Miscellaneous” group. IfTrue, your
Django admin will initially look as it normally would. It will not update
existingApplication groups.ADMIN_INDEX_SHOW_MENU(defaults to:True)Show the admin index as a menu above the breadcrumbs. Submenu’s are filled
with the registered models.ADMIN_INDEX_HIDE_APP_INDEX_PAGES(defaults to:True)Removes the links to the app index pages from the main index and the
breadcrumbs.ADMIN_INDEX_DISPLAY_DROP_DOWN_MENU_CONDITION_FUNCTION(defaults todjango_admin_index.utils.should_display_dropdown_menu)A python dotted path that can be imported to check when the dropdown menu should be
displayed in the admin. The default implementation displays this menu if the user is
a staff user andADMIN_INDEX_SHOW_MENUis enabled.ExtraThemingBy default, django-admin-index tabs/dropdowns are styled in the Django admin theme
colours. On Django 3.2+ these are controlled through CSS variables in thestatic/admin/css/base.cssstylesheet. These CSS variables are used as defaults for
django-admin-index’ own CSS variables.Seescss/_vars.scssfor all the available CSS variables you can use to customize
the color palette. A simple example::root{--djai-tab-bg:#ff0080;--djai-tab-bg--hover:#a91b60;}Any rules not supported by CSS vars can be overridden with regular CSS. All elements
have CSS class names following the BEM methodology, such as.djai-dropdown-menu__itemand.djai-dropdown-menu__item.djai-dropdown-menu__item--active.Sticky headerThe header (typically “Django administration”) including the menu (added by this
library) become sticky (ie. they stay visible when you scroll down on large pages). If
you don’t want this, you can add some CSS lines, like:#header{position:initial;}.djai-dropdown-menu{position:initial;}BreadcrumbsYou can also squeeze additional content in the breadcrumbs, just afterHome. Simply overwrite the blockbreadcrumbs_pre_changelistin the
admin templates you desire (change_list.html,change_form.html, etc.){%blockbreadcrumbs_pre_changelist%}&rsaquo; Meaningful breadcrumb element{%endblock%}ContributorsContributors and maintainers can install the project locally with all test dependencies
in a virtualenv:(env)$pipinstall-e.[tests,pep8,coverage,release]Running the test suiteTo run the tests for a single environment (currently installed in your virtualenv), usepytest:(env)$pytestTo run the complete build matrix, usetox:(env)$toxDeveloping the frontendTo develop the stylesheets, you can use the included test project:(env)$pythonmanage.pyrunserverYou also want to install the frontend tooling and run the SCSS compilation to CSS in
watch mode:npminstall# one time to get the dependencies installednpmrunwatchOnce the result is satisfactory, you can make a production build of the stylesheets:npmrunscssThen, commit the changes and make a pull request.