> Version 0.6 brings DashMachine one big step forward to being a finished product by adding a gui to edit the various settings in the config.ini. **Changelog** - improvements to /home including 'pinned' cards, multi-select tag filtering, 'action providers' allowing you to do web searches from the searchbar - rebuilt sidenav with list view, mirroring filter/search/collapse state of the homepage - /settings and /home now on same route - dynamic reloading of settings (no more page reloads) - dedicated config.ini editor slide-out - settings editor slide-out - card editor slide-out - better access group control - dedicated documentation pages - improved documentation - new system for automatically generating documentation for platforms - ability to load custom platforms - added an 'on_starup' method for platforms allowing for registering api routes. (example coming soon)
24 lines
657 B
Python
24 lines
657 B
Python
from flask_wtf import FlaskForm
|
|
from wtforms import StringField, PasswordField, BooleanField, SelectField
|
|
from wtforms.validators import DataRequired, Length
|
|
|
|
|
|
class UserForm(FlaskForm):
|
|
username = StringField(validators=[DataRequired(), Length(min=1, max=120)])
|
|
|
|
password = PasswordField(validators=[DataRequired(), Length(min=8, max=120)])
|
|
|
|
role = SelectField(choices=[])
|
|
|
|
id = StringField()
|
|
|
|
confirm_password = PasswordField()
|
|
|
|
|
|
class LoginForm(FlaskForm):
|
|
username = StringField(validators=[DataRequired()], render_kw={"autofocus": True})
|
|
|
|
password = PasswordField(validators=[DataRequired()])
|
|
|
|
remember = BooleanField()
|