Refactor core/views
This commit is contained in:
parent
8dd865ae97
commit
71daea3479
|
|
@ -4,7 +4,6 @@ from django.contrib.auth.mixins import LoginRequiredMixin
|
|||
from django.http.response import HttpResponse, HttpResponseRedirect
|
||||
from django.shortcuts import render
|
||||
from django.views.decorators.csrf import ensure_csrf_cookie
|
||||
from django.views.generic import TemplateView
|
||||
from graphene_django.views import GraphQLView
|
||||
from wagtail.admin.views.pages.listing import index as wagtailadmin_explore
|
||||
|
||||
|
|
@ -32,10 +31,7 @@ def override_wagtailadmin_explore_default_ordering(request, parent_page_id):
|
|||
Wrap Wagtail's explore view to change the default ordering
|
||||
"""
|
||||
if request.method == 'GET' and 'ordering' not in request.GET:
|
||||
|
||||
# Display reordering handles by default for children of FooPage types.
|
||||
#if FooPage.objects.filter(id=parent_page_id).first():
|
||||
# Display reordering handles by default for children of all Page types.
|
||||
return HttpResponseRedirect(request.path_info + '?ordering=ord')
|
||||
|
||||
|
||||
return wagtailadmin_explore(request, parent_page_id=parent_page_id)
|
||||
|
|
|
|||
Loading…
Reference in New Issue