diff options
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/forms/__init__.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/webmentions_ssg/forms/__init__.py b/webmentions_ssg/forms/__init__.py index 7ab82e3..5d2f827 100644 --- a/webmentions_ssg/forms/__init__.py +++ b/webmentions_ssg/forms/__init__.py @@ -12,12 +12,23 @@ from .validators import AllowedHostname, NotEqualTo, PublicURL class LoginForm(FlaskForm): + """ + Form for authenticating a user. + """ + username = StringField("Username", validators=[InputRequired()]) password = PasswordField("Password", validators=[InputRequired()]) submit = SubmitField("Sign In") class EndpointForm(FlaskForm): + """ + Form for receiving a Webmention. + + The source must be a public HTTP or HTTPS URL distinct from the target. + The target must be an HTTP or HTTPS URL using an allowed hostname. + """ + source = StringField( "source", validators=[ @@ -48,4 +59,8 @@ class EndpointForm(FlaskForm): class AdminActionForm(FlaskForm): + """ + Form for confirming an administrative action. + """ + submit = SubmitField("Confirm") |
