updated email imports

This commit is contained in:
viennet 2020-12-15 08:48:29 +01:00
parent 415810496f
commit 31c40b6492
2 changed files with 8 additions and 9 deletions

View File

@ -45,8 +45,8 @@ import traceback
from email.mime.multipart import MIMEMultipart from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email.header import Header from email.header import Header
from email.mime.base import MIMEBase
from sco_zope import ( from sco_zope import (
ObjectManager, ObjectManager,

View File

@ -39,8 +39,7 @@ TITLES = ("user_name", "nom", "prenom", "email", "roles", "dept")
def generate_excel_sample(): def generate_excel_sample():
"""generates an excel document suitable to import users """generates an excel document suitable to import users"""
"""
style = sco_excel.Excel_MakeStyle(bold=True) style = sco_excel.Excel_MakeStyle(bold=True)
titles = TITLES titles = TITLES
titlesStyles = [style] * len(titles) titlesStyles = [style] * len(titles)
@ -164,11 +163,11 @@ def generate_password():
return "".join(RNG.sample(l, PASSLEN)) return "".join(RNG.sample(l, PASSLEN))
from email.MIMEMultipart import MIMEMultipart import email
from email.MIMEText import MIMEText from email.mime.multipart import MIMEMultipart
from email.MIMEBase import MIMEBase from email.mime.text import MIMEText
from email.Header import Header from email.mime.base import MIMEBase
from email import Encoders from email.header import Header
def mail_password(u, context=None, reset=False): def mail_password(u, context=None, reset=False):