def manage_admin_fs(request):
    profile = UserProfile.get_or_create_profile(request.user)
    if (not profile.is_net_admin):
        return HttpResponseRedirect("/dashboard")
    
    admins_supervised_by_me = UserProfile.objects.filter(Q(is_net_admin=True)
                                                      &  Q(supervisor=request.user)
                                                      & ~Q(user=request.user))
    if len(admins_supervised_by_me)==0:
        exist = False
        first_admin = 0
    else:
        exist = True
        first_admin = admins_supervised_by_me[0].user.id
        
    return simple.direct_to_template(request, 
        template ="openflow/optin_manager/admin_manager/manage_admin_fs.html",
            extra_context = {
                    'user':request.user,
                    'admin_list':admins_supervised_by_me,
                    'exist':exist,
                    'first_admin':first_admin,
            },
    )
The view function to add/remove flowspaces for the admins supervised by this admin
dataset/ETHPy150Open fp7-ofelia/ocf/optin_manager/src/python/openflow/optin_manager/admin_manager/views.py/manage_admin_fs