Переделал мейлы

This commit is contained in:
urec56 2024-08-19 17:41:21 +04:00
parent 0b7f513187
commit a1397f2f10
2 changed files with 108 additions and 102 deletions

View file

@ -1,8 +1,8 @@
from celery import Celery from celery import Celery
from app.config import settings from app.config import settings
celery = Celery("tasks", broker=f"redis://{settings.REDIS_HOST}:{settings.REDIS_PORT}", include=["app.tasks.tasks"])
celery = Celery("tasks", broker=f"redis://{settings.REDIS_HOST}:{settings.REDIS_PORT}/1", include=["app.tasks.tasks"])
celery.conf.update(result_backend=f"redis://{settings.REDIS_HOST}:{settings.REDIS_PORT}") celery.conf.update(result_backend=f"redis://{settings.REDIS_HOST}:{settings.REDIS_PORT}")

View file

@ -23,65 +23,68 @@ def create_registration_confirmation_template(
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@200&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@200&display=swap" rel="stylesheet">
<title>Submiting</title> <title>Submiting</title>
</head> </head>
<body> <body>
<body style=" <body style="
width:99%; width:99%;
height:99%; height:99%;
display: flex; display: flex;
flex-direction:column; flex-direction:column;
align-items: center; align-items: center;
background-color:#101010; background-color:#101010;
font-family: 'Comfortaa'; font-family: 'Comfortaa';
font-weight: 200; font-weight: 200;
font-style: normal; font-style: normal;
font-stretch: normal; font-stretch: normal;
font-optical-sizing: auto;"> font-optical-sizing: auto;
">
<div style="display: flex; <div style="
flex-direction: column; display: flex;
justify-content:space-around; flex-direction: column;
align-items: center; justify-content:space-around;
text-align:center; align-items: center;
text-align:center;
height:500px; height:500px;
aspect-ratio: 1 / 1.44; aspect-ratio: 1 / 1.44;
border: 1px solid transparent; border: 1px solid transparent;
background: background:
linear-gradient(#101010, #101010) padding-box, linear-gradient(#101010, #101010) padding-box,
linear-gradient(to bottom, #3C53FF, #7734AA) border-box; linear-gradient(to bottom, #3C53FF, #7734AA) border-box;
border-radius: 15px; border-radius: 15px;
"> ">
<h1 style=" color:white; <h1 style="color:white;">Код подтверждения, {username}</h1>
">Код подтверждения, {username}</h1> <div style="
<div style="border: 1px solid transparent; border: 1px solid transparent;
background: background:
linear-gradient(#101010, #101010) padding-box, linear-gradient(#101010, #101010) padding-box,
linear-gradient(to bottom, #3C53FF, #7734AA) border-box; linear-gradient(to bottom, #3C53FF, #7734AA) border-box;
border-radius: 15px;"> border-radius: 15px;
">
<h2 style="color:white; <h2 style="color:white; padding:0 5px 0 5px;">{confirmation_code}</h2>
padding:0 5px 0 5px;">{confirmation_code}</h2>
</div> </div>
<h1 style="color:white;">или</h1> <h1 style="color:white;">или</h1>
<a href="{confirmation_link}" style="border: 1px solid transparent; <a href="{confirmation_link}" style="
background: border: 1px solid transparent;
linear-gradient(#101010, #101010) padding-box, background:
linear-gradient(to bottom, #3C53FF, #7734AA) border-box; linear-gradient(#101010, #101010) padding-box,
border-radius: 15px; linear-gradient(to bottom, #3C53FF, #7734AA) border-box;
text-decoration: none;"> border-radius: 15px;
text-decoration: none;
">
<h2 style="color: white; <h2 style="color: white; padding:0 5px 0 5px;">перейдите по ссылке</h2>
padding:0 5px 0 5px;">перейдите по ссылке</h2>
</a> </a>
</div> </div>
</body> </body>
@ -109,52 +112,54 @@ def create_data_change_confirmation_email(username: str, email_to: EmailStr, _:
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@200&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@200&display=swap" rel="stylesheet">
<title>Submiting</title> <title>Submiting</title>
</head> </head>
<body> <body>
<body style=" <body style="
width:99%; width:99%;
height:99%; height:99%;
display: flex; display: flex;
flex-direction:column; flex-direction:column;
align-items: center; align-items: center;
background-color:#101010; background-color:#101010;
font-family: 'Comfortaa'; font-family: 'Comfortaa';
font-weight: 200; font-weight: 200;
font-style: normal; font-style: normal;
font-stretch: normal; font-stretch: normal;
font-optical-sizing: auto;"> font-optical-sizing: auto;
">
<div style="display: flex; <div style="
flex-direction: column; display: flex;
justify-content:space-around; flex-direction: column;
align-items: center; justify-content:space-around;
text-align:center; align-items: center;
text-align:center;
height:500px; height:500px;
aspect-ratio: 1 / 1.44; aspect-ratio: 1 / 1.44;
border: 1px solid transparent; border: 1px solid transparent;
background: background:
linear-gradient(#101010, #101010) padding-box, linear-gradient(#101010, #101010) padding-box,
linear-gradient(to bottom, #3C53FF, #7734AA) border-box; linear-gradient(to bottom, #3C53FF, #7734AA) border-box;
border-radius: 15px; border-radius: 15px;
"> ">
<h1 style=" color:white; <h1 style="color:white;">Код подтверждения, {username}</h1>
">Код подтверждения, {username}</h1> <div style="
<div style="border: 1px solid transparent; border: 1px solid transparent;
background: background:
linear-gradient(#101010, #101010) padding-box, linear-gradient(#101010, #101010) padding-box,
linear-gradient(to bottom, #3C53FF, #7734AA) border-box; linear-gradient(to bottom, #3C53FF, #7734AA) border-box;
border-radius: 15px;"> border-radius: 15px;
">
<h2 style="color:white; <h2 style="color:white; padding:0 5px 0 5px;">{confirmation_code}</h2>
padding:0 5px 0 5px;">{confirmation_code}</h2>
</div> </div>
</div> </div>
</body> </body>
@ -182,44 +187,45 @@ def create_data_change_email(username: str, email_to: EmailStr):
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@200&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@200&display=swap" rel="stylesheet">
<title>Submiting</title> <title>Submiting</title>
</head> </head>
<body> <body>
<body style=" <body style="
width:99%; width:99%;
height:99%; height:99%;
display: flex; display: flex;
flex-direction:column; flex-direction:column;
align-items: center; align-items: center;
background-color:#101010; background-color:#101010;
font-family: 'Comfortaa'; font-family: 'Comfortaa';
font-weight: 200; font-weight: 200;
font-style: normal; font-style: normal;
font-stretch: normal; font-stretch: normal;
font-optical-sizing: auto;"> font-optical-sizing: auto;
">
<div style="display: flex; <div style="
flex-direction: column; display: flex;
justify-content:space-around; flex-direction: column;
align-items: center; justify-content:space-around;
text-align:center; align-items: center;
text-align:center;
height:500px; height:500px;
aspect-ratio: 1 / 1.44; aspect-ratio: 1 / 1.44;
border: 1px solid transparent; border: 1px solid transparent;
background: background:
linear-gradient(#101010, #101010) padding-box, linear-gradient(#101010, #101010) padding-box,
linear-gradient(to bottom, #3C53FF, #7734AA) border-box; linear-gradient(to bottom, #3C53FF, #7734AA) border-box;
border-radius: 15px; border-radius: 15px;
"> ">
<h1 style=" color:white; <h1 style=" color:white;">{username} успешно поменял данные. УРА! УРА! УРА!!!</h1>
">{username} успешно поменял данные. УРА! УРА! УРА!!!</h1>
</div> </div>
</body> </body>
</body> </body>