Initial commit

This commit is contained in:
2024-08-27 20:33:44 +02:00
commit 1f1832267d
14794 changed files with 1599592 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
from django.contrib.contenttypes.models import ContentType
from wagtail.coreutils import resolve_model_string
CONTENT_TYPE_ORDER = {}
def register(model, **kwargs):
"""
Registers order against the model content_type, used to
control the order the models and its permissions appear
in the groups object permission editor
"""
order = kwargs.pop("order", None)
if order is not None:
content_type = ContentType.objects.get_for_model(resolve_model_string(model))
CONTENT_TYPE_ORDER[content_type.id] = order