mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-10-31 22:47:05 +01:00
WebApp: reformat whitespace according to PEP8
This commit is contained in:
parent
1f27ebafdb
commit
aa5999203c
@ -49,9 +49,11 @@ def emit_doorstate(response=None):
|
|||||||
evt.set()
|
evt.set()
|
||||||
evt.clear()
|
evt.clear()
|
||||||
|
|
||||||
|
|
||||||
def event_str():
|
def event_str():
|
||||||
return "data: {}\n\n".format(json_push_state)
|
return "data: {}\n\n".format(json_push_state)
|
||||||
|
|
||||||
|
|
||||||
def push_state():
|
def push_state():
|
||||||
def event_str():
|
def event_str():
|
||||||
return "data: {}\n\n".format(json_push_state)
|
return "data: {}\n\n".format(json_push_state)
|
||||||
@ -64,6 +66,7 @@ def push_state():
|
|||||||
except GeneratorExit:
|
except GeneratorExit:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
class AuthenticationForm(FlaskForm):
|
class AuthenticationForm(FlaskForm):
|
||||||
username = StringField('Username', [Length(min=3, max=25)])
|
username = StringField('Username', [Length(min=3, max=25)])
|
||||||
password = PasswordField('Password', [DataRequired()])
|
password = PasswordField('Password', [DataRequired()])
|
||||||
@ -86,6 +89,7 @@ class AuthenticationForm(FlaskForm):
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
@webapp.route('/display')
|
@webapp.route('/display')
|
||||||
def display():
|
def display():
|
||||||
return render_template('display.html',
|
return render_template('display.html',
|
||||||
@ -93,6 +97,7 @@ def display():
|
|||||||
title=title,
|
title=title,
|
||||||
welcome=welcome)
|
welcome=welcome)
|
||||||
|
|
||||||
|
|
||||||
@webapp.route('/push')
|
@webapp.route('/push')
|
||||||
def push():
|
def push():
|
||||||
emit_doorstate()
|
emit_doorstate()
|
||||||
|
Loading…
Reference in New Issue
Block a user