From 61a034383558d53d756d83d28cf49eef40384caa Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Tue, 5 Jul 2022 11:13:11 +0400 Subject: [PATCH] WTForms old version compatibility --- .gitignore | 103 ++++++++++++++++++ lesa/forms.py | 7 +- main.py | 2 - setup.py | 2 +- .../test_reg_performance.cpython-310.pyc | Bin 3826 -> 0 bytes 5 files changed, 107 insertions(+), 7 deletions(-) create mode 100644 .gitignore delete mode 100644 tests/__pycache__/test_reg_performance.cpython-310.pyc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f6253a3 --- /dev/null +++ b/.gitignore @@ -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/ diff --git a/lesa/forms.py b/lesa/forms.py index beb3760..935e87c 100644 --- a/lesa/forms.py +++ b/lesa/forms.py @@ -1,8 +1,7 @@ import phonenumbers from flask_wtf import FlaskForm -from wtforms import StringField -from wtforms import IntegerField, RadioField -from wtforms import DateField, TelField +from wtforms import StringField, IntegerField +from wtforms import DateField, RadioField from wtforms import FieldList, FormField from wtforms import HiddenField from wtforms import validators @@ -32,7 +31,7 @@ class ParentForm(FlaskForm): surname = StringField(label='Фамилия') firstname = StringField(label='Имя') midname = StringField(label='Отчество') - phone = TelField( + phone = StringField( label='Номер телефона', validators=[validators.Regexp(tel_regex)] ) diff --git a/main.py b/main.py index b630848..abcf86e 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,3 @@ -# For Deta - import waitress from lesa.app import app diff --git a/setup.py b/setup.py index 94bd9a8..56d5697 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name='lesa', - version='1.0.0', + version='1.0.1', packages=['lesa'], include_package_data=True, zip_safe=False, diff --git a/tests/__pycache__/test_reg_performance.cpython-310.pyc b/tests/__pycache__/test_reg_performance.cpython-310.pyc deleted file mode 100644 index b829d8fe7ee5e4a6e11979454d8277c80d03db28..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3826 zcma)9-ESOM6`#3tXLfe>!)rTn9FkHu1=OWV?5GO)AW4%tX&cm5IYdf}U1hYEle$Sly zJHK=8-EOTGSa|%O|KZMP!m|EEjolAN;|e6Z4<#&Nr&c&F?a(%D7BW*hp<_xOa#OmY zi;|^Y+Y7yRDJE!blVh&qC!_TKBugty_@exnKe9uArza2<(^D>2 z#q**jOQJ3VF#%~nCefaPOhXPq4nt-jMgUj#F{mkf@Qs74+rMCsp*1X=fqX=7 zsl)8|Z8CKPhieAcI&d-5d|bO`{p1HfW*g21&-u_5aQ23qyMi6HHawIL$`VSB($D!u zId?z>XVzM`)GPFc9MN#Z!e}`!Z>MisLrs4Rn>JzJoXD%g24>Vo46E0Tlj=)P?K#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