Exemple #1
0
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)
Exemple #2
0
def addDev():
    #device={"name": "", "desc": "", "typeName": "", "refreshTime": "", "isRec": False}
    form = Forms.addDevice()
    
    if form.validate_on_submit():
        client.sendTo(form.getDict())
        return redirect(url_for('device', name=0))
    return render_template('addDevice.html', title='Sign In', form=form)
Exemple #3
0
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')
Exemple #4
0
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)
Exemple #5
0
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)
Exemple #6
0
def addCon():
    form = Forms.addCon()
    if form.validate_on_submit():
        client.sendTo(form.getDict())
        return redirect(url_for('cond', name=0))
    return render_template('addCon.html', title='Sign In', form=form)