Compare commits
2 commits
83404e2ed5
...
a24fb897a3
Author | SHA1 | Date | |
---|---|---|---|
a24fb897a3 | |||
7259046916 |
3 changed files with 37 additions and 7 deletions
|
@ -2,5 +2,5 @@
|
|||
{% load form %}
|
||||
{% block content %}
|
||||
<h1>Créer un compte</h1>
|
||||
{% form form %}
|
||||
{% form form submit="Créer mon compte" %}
|
||||
{% endblock content %}
|
||||
|
|
|
@ -1,9 +1,30 @@
|
|||
{% extends "base.html" %}
|
||||
{% load form %}
|
||||
{% block content %}
|
||||
<h1>Connexion</h1>
|
||||
{% for error in form.non_field_errors %}<article class="message error">{{ error }}</article>{% endfor %}
|
||||
<form method="post" {% if action %}action="{% url action %}"{% endif %}>
|
||||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
<fieldset>
|
||||
{% if field.id_for_label %}
|
||||
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
|
||||
{% else %}
|
||||
<legend>{{ field.label }}</legend>
|
||||
{% endif %}
|
||||
{{ field }}
|
||||
{% if field.errors %}
|
||||
<small id="{{ field.errors.field_id }}_error" class="form-error">{{ field.errors|join:", " }}</small>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
{% endfor %}
|
||||
<button type="submit">Me connecter</button>
|
||||
<p>
|
||||
<a href="{% url "signup" %}">Créer un compte</a>
|
||||
<a href="{% url "signup" %}" role="button" class="secondary">Créer mon compte</a>
|
||||
</p>
|
||||
{% form form submit="Se connecter" %}
|
||||
<p>
|
||||
<a href="{% url "password_reset" %}"
|
||||
role="button"
|
||||
class="outline secondary">J'ai oublié mon mot de passe</a>
|
||||
</p>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -141,3 +141,12 @@ YOUTUBE_API_KEY = os.getenv("YOUTUBE_API_KEY", "")
|
|||
YOUTUBE_OAUTH_SECRETS = os.getenv("YOUTUBE_OAUTH_SECRETS", "")
|
||||
|
||||
CELERY_BROKER_URL = os.getenv("CELERY_BROKER_URL", None)
|
||||
|
||||
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
|
||||
EMAIL_HOST = os.getenv("EMAIL_HOST")
|
||||
EMAIL_PORT = os.getenv("EMAIL_PORT", 587)
|
||||
EMAIL_HOST_USER = os.getenv("EMAIL_HOST_USER")
|
||||
EMAIL_HOST_PASSWORD = os.getenv("EMAIL_HOST_PASSWORD")
|
||||
EMAIL_USE_SSL = os.getenv("EMAIL_USE_SSL", False)
|
||||
EMAIL_USE_TLS = os.getenv("EMAIL_USE_TLS", not EMAIL_USE_SSL)
|
||||
DEFAULT_FROM_EMAIL = os.getenv("DEFAULT_FROM_EMAIL", EMAIL_HOST_USER)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue