From e0be0f8feef8cfb7f5da4fe516b33529ec1712c9 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sat, 1 Jan 2022 18:02:23 +0100 Subject: [PATCH] Modification imports pour WTForms 3.0 --- app/entreprises/forms.py | 41 +++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/app/entreprises/forms.py b/app/entreprises/forms.py index 0e145f43..1f76732d 100644 --- a/app/entreprises/forms.py +++ b/app/entreprises/forms.py @@ -1,16 +1,43 @@ -from flask import flash +# -*- mode: python -*- +# -*- coding: utf-8 -*- + +############################################################################## +# +# Gestion scolarite IUT +# +# Copyright (c) 1999 - 2022 Emmanuel Viennet. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# +############################################################################## + +import re +import requests + from flask_wtf import FlaskForm -from markupsafe import Markup -import requests, re -from wtforms import StringField, SubmitField, TextAreaField, SelectField, HiddenField -from wtforms.fields.html5 import EmailField, DateField from flask_wtf.file import FileField, FileAllowed, FileRequired +from markupsafe import Markup +from sqlalchemy import text +from wtforms import StringField, SubmitField, TextAreaField, SelectField, HiddenField +from wtforms.fields import EmailField, DateField from wtforms.validators import ValidationError, DataRequired, Email + from app.entreprises.models import Entreprise, EntrepriseContact from app.models import Identite from app.auth.models import User -from app.scodoc import sco_etud -from sqlalchemy import text CHAMP_REQUIS = "Ce champ est requis"