def save_config(node, force=False):
    filepath = os.path.join("nodes", env.host_string + ".json")
    tmp_filename = 'tmp_{0}.json'.format(env.host_string)
    files_to_create = [tmp_filename]
    if not os.path.exists(filepath) or force:
        # Only save to nodes/ if there is not already a file
        print "Saving node configuration to {0}...".format(filepath)
        files_to_create.append(filepath)
    for node_file in files_to_create:
        with open(node_file, 'w') as f:
            f.write(json.dumps(node, indent=4, sort_keys=True))
    return tmp_filename
Adds a form to an app (under a module)
dataset/ETHPy150Open tobami/littlechef/littlechef/chef.py/save_config--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/app_manager/views/forms.py/new_form