(request, domain)
return HttpResponseRedirect(request.POST.get('redirect', fallback_url))
Unassign all users from their locations.  This is for downgraded domains.
Unassign all users from their locations.  This is for downgraded domains.
Unassign all users from their locations . This is for downgraded domains .
def unassign_users(request, domain):
    """
    Unassign all users from their locations.  This is for downgraded domains.
    """
    for user in get_users_assigned_to_locations(domain):
        if user.is_web_user():
            user.unset_location(domain)
        elif user.is_commcare_user():
            user.unset_location()

    messages.success(request,
                     _("All users have been unassigned from their locations"))
    fallback_url = reverse('users_default', args=[domain])
    return HttpResponseRedirect(request.POST.get('redirect', fallback_url))
def unassign_users ( request , domain ) : for user in get_users_assigned_to_locations ( domain ) : if user . is_web_user ( ) : user . unset_location ( domain ) elif user . is_commcare_user ( ) : user . unset_location ( ) messages . success ( request , _ ( "All users have been unassigned from their locations" ) ) fallback_url = reverse ( 'users_default' , args = [ domain ] ) return HttpResponseRedirect ( request . POST . get ( 'redirect' , fallback_url ) )