Beispiel #1
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)
Beispiel #2
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)
Beispiel #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')
Beispiel #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)
Beispiel #5
0
def index():

    data=client.refresh()
    return render_template('index.html',title='Home', data=data)
Beispiel #6
0
def dataStr():
    data=client.refresh()
    return render_template('dataStr.html',title='data',strin=str(data))
Beispiel #7
0
def cam(ip='0'):
    data=client.refresh()
    return render_template('cam.html',title='Cameras', data=data, ip=ip)