def edit_sensor(sensor_id): sensor = SensorInteractor.get(sensor_id) if sensor: return render_template("/sensor/add.html", sensor = sensor, modules = ModuleInteractor.get_all() ) flash("Sensor doesn't exist!", category={ 'theme': 'error' } ) app.logger.error("Sensor editing view: Sensor doesn't exist") return redirect("/sensors/")
def add_sensor(): return render_template("sensor/add.html", modules = ModuleInteractor.get_all() )