def update_config(): c = ConfigChanger('/ghcc_process/config/config.yaml') config = c.get_empty_config() config['github']['accesstoken'] = request.form['token'] config['github']['org_name'] = request.form['orgname'] config['github']['username'] = request.form['username'] c.write_config(config) # restart ghcc process return redirect('/supervisor/restart?proc=ghcc')
def edit_config(): c = ConfigChanger('/ghcc_process/config/config.yaml') if not c.config_file_ok(): config = c.get_empty_config() default_config = True else: config = c.load_config() default_config = False return render_template('config.html', config=config, default_config=default_config)