add mail registration to app

This commit is contained in:
2021-10-27 20:03:41 +03:00
parent 196e9ab73b
commit 1b19a007ae
12 changed files with 167 additions and 33 deletions

View File

@@ -0,0 +1,29 @@
{% extends "base.html" %}
{% block content %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,700">
<title>Bootstrap Simple Login Form with Blue Background</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
<style>
body {
color: #fff;
background: #3598dc;
font-family: 'Roboto', sans-serif;
}
.info-form {
padding-top: 100px;
text-align: center;
}
</style>
<div class="info-form" >
<h3>{{message}}</h3>
</div>
{% endblock %}

View File

@@ -98,7 +98,11 @@ body {
<hr>
{% csrf_token %}
<div class="form-group">
<input type="text" class="form-control" name="username" placeholder="Username" required="required">
{% if form.username.value %}
<input type="text" class="form-control" name="username" value="{{ form.username.value }}">
{% else %}
<input type="text" class="form-control" name="username" placeholder="Username" required="required">
{% endif %}
</div>
<div class="form-group">
<input type="password" class="form-control" name="password" placeholder="Password" required="required">

View File

@@ -1,6 +1,8 @@
<!doctype html>
<body>
<div>
<p style="color: green">Добро пожаловать, {{ username }}!</p>
<p style="color: green">Добро пожаловать, {{username}}!</p>
<p style="color: green">Чтобы активировать учётную запись перейдите по ссылке:
<a href="{{text_content}}">Завершить регистрацию</a></p>
</div>
</body>