def index(self): current_app.config['confd']['token'] = current_app.config[ 'service_token'] with confd_client(current_app.config['confd']) as confd: fk = gen_template_fk( confd, confd.users.relations(get_id( confd, current_user.get_uuid())).list_funckeys()) return render_template('fk.html', fk=fk, rabbitmq=current_app.config['rabbitmq'])
def post(self): form=FormCTIPassword() if form.validate_on_submit(): user = dict(id=current_user.get_uuid(),password=form.data['password']) current_app.config['confd']['token'] = current_app.config['service_token'] with confd_client(current_app.config['confd']) as confd: try: confd.users.update(user) return redirect(url_for('q_ctipassword.CTIPassword:get')) except: print "Error to update user password" return render_template('ctipassword.html',form=form)
def index(self): current_app.config['confd']['token'] = current_app.config['service_token'] with confd_client(current_app.config['confd']) as confd: fk = gen_template_fk(confd, confd.users.relations(get_id(confd, current_user.get_uuid())).list_funckeys()) return render_template('fk.html', fk=fk, rabbitmq=current_app.config['rabbitmq'])