MCPcopy
hub / github.com/django/django / get_app_list

Method get_app_list

django/contrib/admin/sites.py:541–555  ·  view source on GitHub ↗

Return a sorted list of all the installed apps that have been registered in this site.

(self, request, app_label=None)

Source from the content-addressed store, hash-verified

539 return app_dict
540
541 def get_app_list(self, request, app_label=None):
542 """
543 Return a sorted list of all the installed apps that have been
544 registered in this site.
545 """
546 app_dict = self._build_app_dict(request, app_label)
547
548 # Sort the apps alphabetically.
549 app_list = sorted(app_dict.values(), key=lambda x: x["name"].lower())
550
551 # Sort the models alphabetically within each app.
552 for app in app_list:
553 app["models"].sort(key=lambda x: x["name"])
554
555 return app_list
556
557 def index(self, request, extra_context=None):
558 """

Callers 3

each_contextMethod · 0.95
indexMethod · 0.95
app_indexMethod · 0.95

Calls 3

_build_app_dictMethod · 0.95
valuesMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected