WTForms old version compatibility

This commit is contained in:
DarkCat09 2022-07-05 11:13:11 +04:00
parent e77f8e8b58
commit 61a0343835
5 changed files with 107 additions and 7 deletions

103
.gitignore vendored Normal file
View file

@ -0,0 +1,103 @@
# ---> Python
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/

View file

@ -1,8 +1,7 @@
import phonenumbers import phonenumbers
from flask_wtf import FlaskForm from flask_wtf import FlaskForm
from wtforms import StringField from wtforms import StringField, IntegerField
from wtforms import IntegerField, RadioField from wtforms import DateField, RadioField
from wtforms import DateField, TelField
from wtforms import FieldList, FormField from wtforms import FieldList, FormField
from wtforms import HiddenField from wtforms import HiddenField
from wtforms import validators from wtforms import validators
@ -32,7 +31,7 @@ class ParentForm(FlaskForm):
surname = StringField(label='Фамилия') surname = StringField(label='Фамилия')
firstname = StringField(label='Имя') firstname = StringField(label='Имя')
midname = StringField(label='Отчество') midname = StringField(label='Отчество')
phone = TelField( phone = StringField(
label='Номер телефона', label='Номер телефона',
validators=[validators.Regexp(tel_regex)] validators=[validators.Regexp(tel_regex)]
) )

View file

@ -1,5 +1,3 @@
# For Deta
import waitress import waitress
from lesa.app import app from lesa.app import app

View file

@ -2,7 +2,7 @@ from setuptools import setup
setup( setup(
name='lesa', name='lesa',
version='1.0.0', version='1.0.1',
packages=['lesa'], packages=['lesa'],
include_package_data=True, include_package_data=True,
zip_safe=False, zip_safe=False,