kopia lustrzana https://github.com/wagtail/wagtail
add_subpage view now sorts content types by their verbose names.
rodzic
8e3c9e9721
commit
9f97e32960
|
@ -73,7 +73,9 @@ def add_subpage(request, parent_page_id):
|
|||
if not parent_page.permissions_for_user(request.user).can_add_subpage():
|
||||
raise PermissionDenied
|
||||
|
||||
page_types = sorted(parent_page.allowed_subpage_types(), key=lambda pagetype: pagetype.name.lower())
|
||||
page_types = sorted(parent_page.allowed_subpage_types(),
|
||||
key=lambda pagetype: pagetype.model_class().get_verbose_name().lower()
|
||||
)
|
||||
|
||||
if len(page_types) == 1:
|
||||
# Only one page type is available - redirect straight to the create form rather than
|
||||
|
|
Ładowanie…
Reference in New Issue