def METHOD_NAME(request, groupid):
    """Renders the view for editing device groups
    :param request:
    :type request: django.http.HttpRequest
    """
    group = get_object_or_404(NetboxGroup, pk=groupid)
    navpath = get_netboxgroup_path([(group.pk,), ('edit',)])
    if request.method == 'POST':
        return handle_edit_request(request, group)
    netboxes = Netbox.objects.exclude(
        pk__in=group.netboxes.all().values_list('id', flat=True)
    )
    return render(
        request,
        'info/netboxgroup/group_edit.html',
        {
            'netboxgroup': group,
            'netboxes': netboxes,
            'navpath': navpath,
            'title': create_title(navpath),
        },
    )