Compare commits

..

1 Commits

Author SHA1 Message Date
Jonas Schäfer
a1ecb4ce80 Port to WTForms 3.x
Fixes #103.
2022-01-22 15:17:48 +01:00
5 changed files with 3 additions and 27 deletions

View File

@@ -50,29 +50,6 @@ jobs:
run: | run: |
python -m flake8 snikket_web python -m flake8 snikket_web
translation-check:
runs-on: ubuntu-latest
name: 'lint: i18n'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install
run: |
set -euo pipefail
pip install flask-babel
- name: Linting
run: |
sed -ri '/^"POT-Creation-Date: /d' snikket_web/translations/messages.pot
git add snikket_web/translations/messages.pot
make extract_translations
sed -ri '/^"POT-Creation-Date: /d' snikket_web/translations/messages.pot
git diff --exit-code --color -- snikket_web/translations/messages.pot
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@@ -5,5 +5,5 @@ hsluv~=0.0.2
flask-babel~=1.0 flask-babel~=1.0
email-validator~=1.1 email-validator~=1.1
environ-config~=20.0 environ-config~=20.0
wtforms~=2.3 wtforms~=3.0
typing-extensions typing-extensions

View File

@@ -10,7 +10,6 @@ import aiohttp
import quart.flask_patch import quart.flask_patch
import wtforms import wtforms
import wtforms.fields.html5
from quart import ( from quart import (
Blueprint, Blueprint,

View File

@@ -32,7 +32,7 @@ bp = quart.Blueprint("main", __name__)
class LoginForm(BaseForm): class LoginForm(BaseForm):
address = wtforms.TextField( address = wtforms.StringField(
_l("Address"), _l("Address"),
validators=[wtforms.validators.InputRequired()], validators=[wtforms.validators.InputRequired()],
) )

View File

@@ -59,7 +59,7 @@ _ACCESS_MODEL_CHOICES = [
class ProfileForm(BaseForm): class ProfileForm(BaseForm):
nickname = wtforms.TextField( nickname = wtforms.StringField(
_l("Display name"), _l("Display name"),
) )