Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
protokollsystem
proto3
Commits
247b6c4d
Commit
247b6c4d
authored
Feb 17, 2018
by
Julian Rother
Browse files
Change syntax in
bf3ebb1c
to support older python versions
parent
2e091a2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
views/forms.py
View file @
247b6c4d
...
@@ -101,7 +101,8 @@ class IPNetworkField(Field):
...
@@ -101,7 +101,8 @@ class IPNetworkField(Field):
class
FocusedStringField
(
StringField
):
class
FocusedStringField
(
StringField
):
def
__call__
(
self
,
**
kwargs
):
def
__call__
(
self
,
**
kwargs
):
return
super
().
__call__
(
**
kwargs
,
autofocus
=
True
)
kwargs
[
'autofocus'
]
=
True
return
super
().
__call__
(
**
kwargs
)
class
LoginForm
(
FlaskForm
):
class
LoginForm
(
FlaskForm
):
username
=
FocusedStringField
(
"Benutzer"
,
validators
=
[
InputRequired
(
"Bitte gib deinen Benutzernamen ein."
)])
username
=
FocusedStringField
(
"Benutzer"
,
validators
=
[
InputRequired
(
"Bitte gib deinen Benutzernamen ein."
)])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment