From 483d41c7a63ac041dd067484320eac366dea9021 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Wed, 12 Dec 2018 16:34:15 +0100 Subject: [PATCH] Event plugin list: Use a more useful sorting of the list --- src/pretix/base/plugins.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pretix/base/plugins.py b/src/pretix/base/plugins.py index 72081a2136..c46d7bc286 100644 --- a/src/pretix/base/plugins.py +++ b/src/pretix/base/plugins.py @@ -30,4 +30,7 @@ def get_all_plugins() -> List[type]: if app.name in settings.PRETIX_PLUGINS_EXCLUDE: continue plugins.append(meta) - return plugins + return sorted( + plugins, + key=lambda m: (0 if m.module.startswith('pretix.') else 1, str(m.name).lower().replace('pretix ', '')) + )