![]() ![]() I don't want more lines there I need to manage what the "current" row is, etc. I only want that table to be one row, which will hold the value of True / False. I can't figure out how to 1) query the boolean value and 2) how to set it and commit it to the db. ![]() Return render_template('index.html', button_on_off=button_switch, manual_mode=manual_on) This does not seem to cause many problems, as we seldom get complaints about it. Instead, TRUE and FALSE are (normally) represented as integers 1 and 0, respectively. (something should go here to set bool = False and commit) Unlike most other SQL implementations, SQLite does not have a separate BOOLEAN data type. Return render_template('index.html', manual_mode=manual_on, button_on_off=button_on_off) Schema dumps may not be restored to in-memory SQLite databases. (something should go here to set bool = True and commit) Is_manual = db.Column(db.Boolean, nullable=False, default=False, primary_key=True)īutton_on_off = ('button_on_off') I have a flask app that will control a light bulb by doing two things:ġ) input a schedule into db and the bulb turns on and off (this works fine)Ģ) html buttons to "manually" turn on / off the light (this doesn't work)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |