human
I wrote the below code

    def get_id(s):
        s = s.split(u'_')[(-1)]
        return (int(s) if s.isdigit() else None)
    page = get_object_or_404(Page, id=get_id(request.POST[u'id']))
    old_parent_id = page.parent_id
    new_parent_id = get_id(request.POST[u'parent_id'])
    new_parent = (Page.objects.get(id=new_parent_id) if new_parent_id else None)
    try:
        page.get_content_model().can_move(request, new_parent)
    except PageMoveException as e:
        messages.error(request, e)
        return HttpResponse(u'error')
    if (new_parent_id != page.parent_id):
        page.set_parent(new_parent)
        pages = Page.objects.filter(parent_id=old_parent_id)
        for (i, page) in enumerate(pages.order_by(u'_order')):
            Page.objects.filter(id=page.id).update(_order=i)
    for (i, page_id) in enumerate(request.POST.getlist(u'siblings[]')):
        Page.objects.filter(id=get_id(page_id)).update(_order=i)
    return HttpResponse(u'ok')

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

@staff_member_required
def admin_page_ordering(request):