admin: sort apps in meta api
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
8a7c414031
commit
a2cfe9c2a7
|
@ -26,6 +26,6 @@ class AppsViewSet(ViewSet):
|
||||||
def list(self, request: Request) -> Response:
|
def list(self, request: Request) -> Response:
|
||||||
"""List current messages and pass into Serializer"""
|
"""List current messages and pass into Serializer"""
|
||||||
data = []
|
data = []
|
||||||
for app in get_apps():
|
for app in sorted(get_apps(), key=lambda app: app.name):
|
||||||
data.append({"name": app.name, "label": app.verbose_name})
|
data.append({"name": app.name, "label": app.verbose_name})
|
||||||
return Response(AppSerializer(data, many=True).data)
|
return Response(AppSerializer(data, many=True).data)
|
||||||
|
|
Reference in New Issue