def effect(conName=0, name=0): form = Forms.addEffect() form.setChoices(client.refresh()) data=client.refresh() if request.method=="POST": #if form.validate==True: print("Przyjeto") form.conName.data=conName form.effectName.data=name client.sendTo(form.getDict()) return redirect(url_for('cond', name=0)) return render_template('cond.html',title='Home',typ='effect', data=data, form=form,conName=conName, name=name)
def addEffect(): form = Forms.addEffect() form.setChoices(client.refresh()) if form.validate_on_submit(): client.sendTo(form.getDict()) return redirect(url_for('cond', name=0)) return render_template('addEffect.html', title='Sign In', form=form)
def device(name=0): form = Forms.addDevice() data=client.refresh() if request.method=="POST": #if form.validate==True: print("Przyjeto") form.name.data=name client.sendTo(form.getDict()) return redirect(url_for('device', name=0)) return render_template('device.html',title='Home', data=data, form=form, name=name, typ='device')
def addDev2(dev): data=client.refresh() print("aaaaaaaaaaaa") form = Forms.addDevice() #form.PreWrite(data["dicDev"][dev]) if form.validate_on_submit(): print("KeyWasPressed") client.sendTo(form.getDict()) return redirect(url_for('device', name=0)) return render_template('addDevice.html', title='Sign In', form=form)
def index(): data=client.refresh() return render_template('index.html',title='Home', data=data)
def dataStr(): data=client.refresh() return render_template('dataStr.html',title='data',strin=str(data))
def cam(ip='0'): data=client.refresh() return render_template('cam.html',title='Cameras', data=data, ip=ip)