This commit is contained in:
2025-08-31 00:29:53 +02:00
parent 191bd84573
commit 29611b15ca
87 changed files with 2451 additions and 0 deletions

View File

@@ -0,0 +1,135 @@
{% extends 'base.html' %}
{% block base_title %}Connexion{% endblock %}
{% block content %}
<div class="auth-container">
<h1>Connexion</h1>
<form method="post" novalidate>
{% csrf_token %}
{% if form.non_field_errors %}
<div class="alert alert-danger">
{% for error in form.non_field_errors %}
{{ error }}
{% endfor %}
</div>
{% endif %}
{% for field in form %}
<div class="form-group">
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
{{ field }}
{% if field.errors %}
<div class="field-errors">
{% for error in field.errors %}
<span class="error">{{ error }}</span>
{% endfor %}
</div>
{% endif %}
</div>
{% endfor %}
<button type="submit" class="btn btn-primary">Se connecter</button>
</form>
<div class="auth-links">
<p>Pas encore de compte ? <a href="{% url 'user:register' %}">S'inscrire</a></p>
<p><a href="{% url 'user:password_reset' %}">Mot de passe oublié ?</a></p>
</div>
</div>
<style>
.auth-container {
max-width: 500px;
margin: 2rem auto;
padding: 2rem;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
margin-bottom: 1.5rem;
text-align: center;
}
.form-group {
margin-bottom: 1rem;
}
label {
display: block;
margin-bottom: 0.5rem;
font-weight: bold;
}
input {
width: 100%;
padding: 0.5rem;
border: 1px solid #ccc;
border-radius: 4px;
}
.field-errors {
color: #dc3545;
margin-top: 0.25rem;
}
.btn {
display: inline-block;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
user-select: none;
border: 1px solid transparent;
padding: 0.5rem 1rem;
font-size: 1rem;
line-height: 1.5;
border-radius: 0.25rem;
cursor: pointer;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}
.btn-primary {
color: #fff;
background-color: #007bff;
border-color: #007bff;
width: 100%;
margin-top: 1rem;
}
.btn-primary:hover {
background-color: #0069d9;
border-color: #0062cc;
}
.auth-links {
margin-top: 1.5rem;
text-align: center;
}
.auth-links a {
color: #007bff;
text-decoration: none;
}
.auth-links a:hover {
text-decoration: underline;
}
.alert {
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.25rem;
}
.alert-danger {
color: #721c24;
background-color: #f8d7da;
border-color: #f5c6cb;
}
</style>
{% endblock %}

View File

@@ -0,0 +1,79 @@
{% extends 'base.html' %}
{% block base_title %}Mot de passe modifié{% endblock %}
{% block content %}
<div class="auth-container">
<h1>Mot de passe modifié</h1>
<div class="alert alert-success">
<p>Votre mot de passe a été modifié avec succès.</p>
</div>
<div class="auth-links">
<a href="/" class="btn btn-primary">Retour à l'accueil</a>
</div>
</div>
<style>
.auth-container {
max-width: 500px;
margin: 2rem auto;
padding: 2rem;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
margin-bottom: 1.5rem;
text-align: center;
}
.btn {
display: inline-block;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
user-select: none;
border: 1px solid transparent;
padding: 0.5rem 1rem;
font-size: 1rem;
line-height: 1.5;
border-radius: 0.25rem;
cursor: pointer;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}
.btn-primary {
color: #fff;
background-color: #007bff;
border-color: #007bff;
width: 100%;
margin-top: 1rem;
}
.btn-primary:hover {
background-color: #0069d9;
border-color: #0062cc;
}
.auth-links {
margin-top: 1.5rem;
text-align: center;
}
.alert {
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.25rem;
}
.alert-success {
color: #155724;
background-color: #d4edda;
border-color: #c3e6cb;
}
</style>
{% endblock %}

View File

@@ -0,0 +1,125 @@
{% extends 'base.html' %}
{% block base_title %}Changer le mot de passe{% endblock %}
{% block content %}
<div class="auth-container">
<h1>Changer le mot de passe</h1>
<form method="post" novalidate>
{% csrf_token %}
{% if form.non_field_errors %}
<div class="alert alert-danger">
{% for error in form.non_field_errors %}
{{ error }}
{% endfor %}
</div>
{% endif %}
{% for field in form %}
<div class="form-group">
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
{{ field }}
{% if field.errors %}
<div class="field-errors">
{% for error in field.errors %}
<span class="error">{{ error }}</span>
{% endfor %}
</div>
{% endif %}
{% if field.help_text %}
<div class="help-text">{{ field.help_text }}</div>
{% endif %}
</div>
{% endfor %}
<button type="submit" class="btn btn-primary">Changer le mot de passe</button>
</form>
</div>
<style>
.auth-container {
max-width: 500px;
margin: 2rem auto;
padding: 2rem;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
margin-bottom: 1.5rem;
text-align: center;
}
.form-group {
margin-bottom: 1rem;
}
label {
display: block;
margin-bottom: 0.5rem;
font-weight: bold;
}
input {
width: 100%;
padding: 0.5rem;
border: 1px solid #ccc;
border-radius: 4px;
}
.field-errors {
color: #dc3545;
margin-top: 0.25rem;
}
.help-text {
font-size: 0.875rem;
color: #6c757d;
margin-top: 0.25rem;
}
.btn {
display: inline-block;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
user-select: none;
border: 1px solid transparent;
padding: 0.5rem 1rem;
font-size: 1rem;
line-height: 1.5;
border-radius: 0.25rem;
cursor: pointer;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}
.btn-primary {
color: #fff;
background-color: #007bff;
border-color: #007bff;
width: 100%;
margin-top: 1rem;
}
.btn-primary:hover {
background-color: #0069d9;
border-color: #0062cc;
}
.alert {
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.25rem;
}
.alert-danger {
color: #721c24;
background-color: #f8d7da;
border-color: #f5c6cb;
}
</style>
{% endblock %}

View File

@@ -0,0 +1,79 @@
{% extends 'base.html' %}
{% block base_title %}Mot de passe réinitialisé{% endblock %}
{% block content %}
<div class="auth-container">
<h1>Mot de passe réinitialisé</h1>
<div class="alert alert-success">
<p>Votre mot de passe a été réinitialisé avec succès.</p>
</div>
<div class="auth-links">
<a href="{% url 'user:login' %}" class="btn btn-primary">Se connecter</a>
</div>
</div>
<style>
.auth-container {
max-width: 500px;
margin: 2rem auto;
padding: 2rem;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
margin-bottom: 1.5rem;
text-align: center;
}
.btn {
display: inline-block;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
user-select: none;
border: 1px solid transparent;
padding: 0.5rem 1rem;
font-size: 1rem;
line-height: 1.5;
border-radius: 0.25rem;
cursor: pointer;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}
.btn-primary {
color: #fff;
background-color: #007bff;
border-color: #007bff;
width: 100%;
margin-top: 1rem;
}
.btn-primary:hover {
background-color: #0069d9;
border-color: #0062cc;
}
.auth-links {
margin-top: 1.5rem;
text-align: center;
}
.alert {
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.25rem;
}
.alert-success {
color: #155724;
background-color: #d4edda;
border-color: #c3e6cb;
}
</style>
{% endblock %}

View File

@@ -0,0 +1,149 @@
{% extends 'base.html' %}
{% block base_title %}Définir un nouveau mot de passe{% endblock %}
{% block content %}
<div class="auth-container">
<h1>Définir un nouveau mot de passe</h1>
{% if validlink %}
<form method="post" novalidate>
{% csrf_token %}
{% if form.non_field_errors %}
<div class="alert alert-danger">
{% for error in form.non_field_errors %}
{{ error }}
{% endfor %}
</div>
{% endif %}
{% for field in form %}
<div class="form-group">
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
{{ field }}
{% if field.errors %}
<div class="field-errors">
{% for error in field.errors %}
<span class="error">{{ error }}</span>
{% endfor %}
</div>
{% endif %}
{% if field.help_text %}
<div class="help-text">{{ field.help_text }}</div>
{% endif %}
</div>
{% endfor %}
<button type="submit" class="btn btn-primary">Changer mon mot de passe</button>
</form>
{% else %}
<div class="alert alert-danger">
<p>Le lien de réinitialisation du mot de passe n'est pas valide, probablement parce qu'il a déjà été utilisé.</p>
<p>Veuillez demander une nouvelle réinitialisation de mot de passe.</p>
</div>
<div class="auth-links">
<a href="{% url 'user:password_reset' %}" class="btn btn-primary">Demander un nouveau lien</a>
</div>
{% endif %}
</div>
<style>
.auth-container {
max-width: 500px;
margin: 2rem auto;
padding: 2rem;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
margin-bottom: 1.5rem;
text-align: center;
}
.form-group {
margin-bottom: 1rem;
}
label {
display: block;
margin-bottom: 0.5rem;
font-weight: bold;
}
input {
width: 100%;
padding: 0.5rem;
border: 1px solid #ccc;
border-radius: 4px;
}
.field-errors {
color: #dc3545;
margin-top: 0.25rem;
}
.help-text {
font-size: 0.875rem;
color: #6c757d;
margin-top: 0.25rem;
}
.btn {
display: inline-block;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
user-select: none;
border: 1px solid transparent;
padding: 0.5rem 1rem;
font-size: 1rem;
line-height: 1.5;
border-radius: 0.25rem;
cursor: pointer;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}
.btn-primary {
color: #fff;
background-color: #007bff;
border-color: #007bff;
width: 100%;
margin-top: 1rem;
}
.btn-primary:hover {
background-color: #0069d9;
border-color: #0062cc;
}
.auth-links {
margin-top: 1.5rem;
text-align: center;
}
.alert {
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.25rem;
}
.alert-danger {
color: #721c24;
background-color: #f8d7da;
border-color: #f5c6cb;
}
.alert p {
margin-bottom: 0.5rem;
}
.alert p:last-child {
margin-bottom: 0;
}
</style>
{% endblock %}

View File

@@ -0,0 +1,88 @@
{% extends 'base.html' %}
{% block base_title %}Email de réinitialisation envoyé{% endblock %}
{% block content %}
<div class="auth-container">
<h1>Email de réinitialisation envoyé</h1>
<div class="alert alert-info">
<p>Nous vous avons envoyé par email les instructions pour réinitialiser votre mot de passe.</p>
<p>Si vous ne recevez pas d'email, vérifiez que vous avez saisi l'adresse avec laquelle vous vous êtes inscrit, et vérifiez votre dossier de spam.</p>
</div>
<div class="auth-links">
<a href="{% url 'user:login' %}" class="btn btn-primary">Retour à la connexion</a>
</div>
</div>
<style>
.auth-container {
max-width: 500px;
margin: 2rem auto;
padding: 2rem;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
margin-bottom: 1.5rem;
text-align: center;
}
.btn {
display: inline-block;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
user-select: none;
border: 1px solid transparent;
padding: 0.5rem 1rem;
font-size: 1rem;
line-height: 1.5;
border-radius: 0.25rem;
cursor: pointer;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}
.btn-primary {
color: #fff;
background-color: #007bff;
border-color: #007bff;
width: 100%;
margin-top: 1rem;
}
.btn-primary:hover {
background-color: #0069d9;
border-color: #0062cc;
}
.auth-links {
margin-top: 1.5rem;
text-align: center;
}
.alert {
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.25rem;
}
.alert-info {
color: #0c5460;
background-color: #d1ecf1;
border-color: #bee5eb;
}
.alert p {
margin-bottom: 0.5rem;
}
.alert p:last-child {
margin-bottom: 0;
}
</style>
{% endblock %}

View File

@@ -0,0 +1,14 @@
{% autoescape off %}
Bonjour,
Vous recevez cet email car vous avez demandé la réinitialisation du mot de passe de votre compte sur {{ site_name }}.
Veuillez suivre le lien ci-dessous pour définir un nouveau mot de passe :
{{ protocol }}://{{ domain }}{% url 'user:password_reset_confirm' uidb64=uid token=token %}
Votre nom d'utilisateur, au cas où vous l'auriez oublié : {{ user.get_username }}
Merci d'utiliser notre site !
L'équipe {{ site_name }}
{% endautoescape %}

View File

@@ -0,0 +1,151 @@
{% extends 'base.html' %}
{% block base_title %}Réinitialisation du mot de passe{% endblock %}
{% block content %}
<div class="auth-container">
<h1>Réinitialisation du mot de passe</h1>
<p class="reset-instructions">Entrez votre adresse e-mail et nous vous enverrons un lien pour réinitialiser votre mot de passe.</p>
<form method="post" novalidate>
{% csrf_token %}
{% if form.non_field_errors %}
<div class="alert alert-danger">
{% for error in form.non_field_errors %}
{{ error }}
{% endfor %}
</div>
{% endif %}
{% for field in form %}
<div class="form-group">
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
{{ field }}
{% if field.errors %}
<div class="field-errors">
{% for error in field.errors %}
<span class="error">{{ error }}</span>
{% endfor %}
</div>
{% endif %}
{% if field.help_text %}
<div class="help-text">{{ field.help_text }}</div>
{% endif %}
</div>
{% endfor %}
<button type="submit" class="btn btn-primary">Envoyer le lien de réinitialisation</button>
</form>
<div class="auth-links">
<p><a href="{% url 'user:login' %}">Retour à la connexion</a></p>
</div>
</div>
<style>
.auth-container {
max-width: 500px;
margin: 2rem auto;
padding: 2rem;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
margin-bottom: 1rem;
text-align: center;
}
.reset-instructions {
margin-bottom: 1.5rem;
text-align: center;
color: #6c757d;
}
.form-group {
margin-bottom: 1rem;
}
label {
display: block;
margin-bottom: 0.5rem;
font-weight: bold;
}
input {
width: 100%;
padding: 0.5rem;
border: 1px solid #ccc;
border-radius: 4px;
}
.field-errors {
color: #dc3545;
margin-top: 0.25rem;
}
.help-text {
font-size: 0.875rem;
color: #6c757d;
margin-top: 0.25rem;
}
.btn {
display: inline-block;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
user-select: none;
border: 1px solid transparent;
padding: 0.5rem 1rem;
font-size: 1rem;
line-height: 1.5;
border-radius: 0.25rem;
cursor: pointer;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}
.btn-primary {
color: #fff;
background-color: #007bff;
border-color: #007bff;
width: 100%;
margin-top: 1rem;
}
.btn-primary:hover {
background-color: #0069d9;
border-color: #0062cc;
}
.auth-links {
margin-top: 1.5rem;
text-align: center;
}
.auth-links a {
color: #007bff;
text-decoration: none;
}
.auth-links a:hover {
text-decoration: underline;
}
.alert {
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.25rem;
}
.alert-danger {
color: #721c24;
background-color: #f8d7da;
border-color: #f5c6cb;
}
</style>
{% endblock %}

View File

@@ -0,0 +1 @@
Réinitialisation de votre mot de passe sur {{ site_name }}

View File

@@ -0,0 +1,143 @@
{% extends 'base.html' %}
{% block base_title %}Inscription{% endblock %}
{% block content %}
<div class="auth-container">
<h1>Inscription</h1>
<form method="post" novalidate>
{% csrf_token %}
{% if form.non_field_errors %}
<div class="alert alert-danger">
{% for error in form.non_field_errors %}
{{ error }}
{% endfor %}
</div>
{% endif %}
{% for field in form %}
<div class="form-group">
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
{{ field }}
{% if field.errors %}
<div class="field-errors">
{% for error in field.errors %}
<span class="error">{{ error }}</span>
{% endfor %}
</div>
{% endif %}
{% if field.help_text %}
<div class="help-text">{{ field.help_text }}</div>
{% endif %}
</div>
{% endfor %}
<button type="submit" class="btn btn-primary">S'inscrire</button>
</form>
<div class="auth-links">
<p>Déjà inscrit ? <a href="{% url 'user:login' %}">Se connecter</a></p>
</div>
</div>
<style>
.auth-container {
max-width: 500px;
margin: 2rem auto;
padding: 2rem;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
margin-bottom: 1.5rem;
text-align: center;
}
.form-group {
margin-bottom: 1rem;
}
label {
display: block;
margin-bottom: 0.5rem;
font-weight: bold;
}
input {
width: 100%;
padding: 0.5rem;
border: 1px solid #ccc;
border-radius: 4px;
}
.field-errors {
color: #dc3545;
margin-top: 0.25rem;
}
.help-text {
font-size: 0.875rem;
color: #6c757d;
margin-top: 0.25rem;
}
.btn {
display: inline-block;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
user-select: none;
border: 1px solid transparent;
padding: 0.5rem 1rem;
font-size: 1rem;
line-height: 1.5;
border-radius: 0.25rem;
cursor: pointer;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}
.btn-primary {
color: #fff;
background-color: #007bff;
border-color: #007bff;
width: 100%;
margin-top: 1rem;
}
.btn-primary:hover {
background-color: #0069d9;
border-color: #0062cc;
}
.auth-links {
margin-top: 1.5rem;
text-align: center;
}
.auth-links a {
color: #007bff;
text-decoration: none;
}
.auth-links a:hover {
text-decoration: underline;
}
.alert {
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.25rem;
}
.alert-danger {
color: #721c24;
background-color: #f8d7da;
border-color: #f5c6cb;
}
</style>
{% endblock %}