mirror of
https://github.com/Balshgit/different
synced 2025-12-16 17:00:41 +03:00
add mail registration to app
This commit is contained in:
29
django_accounts_app/templates/registration/info.html
Normal file
29
django_accounts_app/templates/registration/info.html
Normal 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 %}
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -93,7 +93,6 @@ body {
|
||||
</style>
|
||||
<div class="signup-form">
|
||||
<form method="post">
|
||||
<h2>Sign Up</h2>
|
||||
<p>Please fill in this form to create an account!</p>
|
||||
<hr>
|
||||
{% csrf_token %}
|
||||
@@ -131,9 +130,8 @@ body {
|
||||
{% if form.mobile.value %}
|
||||
<input type="text" class="form-control" name="mobile" value="{{ form.mobile.value }}">
|
||||
{% else %}
|
||||
<input id="mobile" type="row" class="form-control" name="mobile" placeholder="Mobile" >
|
||||
<input id="mobile" type="row" class="form-control" name="mobile" placeholder="Mobile (Not required)">
|
||||
{% endif %}
|
||||
<label for="mobile">Not required</label>
|
||||
<div class="form-group">{{ form.mobile.errors }}</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -144,9 +142,17 @@ body {
|
||||
<div class="form-group">{{ form.password2.errors }}</div>
|
||||
</div>
|
||||
|
||||
<script src='https://www.google.com/recaptcha/api.js'></script>
|
||||
<div class="form-group g-recaptcha" data-sitekey="6LcaYfgcAAAAAEX1GE9myoMEA2xVhWOrXqKUke_j"></div>
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
{{ message }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-lg">Sign Up</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">{{ form.non_field_errors }}</div>
|
||||
</form>
|
||||
<div class="hint-text">Already have an account? <a href="{% url 'accounts:login' %}">Login here</a></div>
|
||||
|
||||
Reference in New Issue
Block a user