diff --git a/base/templates/auth/user_form.html b/base/templates/auth/user_form.html index 257d1dc..20c40a8 100644 --- a/base/templates/auth/user_form.html +++ b/base/templates/auth/user_form.html @@ -2,5 +2,5 @@ {% load form %} {% block content %}

Créer un compte

- {% form form %} + {% form form submit="Créer mon compte" %} {% endblock content %} diff --git a/base/templates/registration/login.html b/base/templates/registration/login.html index 1a78811..8bbb8fd 100644 --- a/base/templates/registration/login.html +++ b/base/templates/registration/login.html @@ -1,9 +1,30 @@ {% extends "base.html" %} -{% load form %} {% block content %}

Connexion

-

- Créer un compte -

- {% form form submit="Se connecter" %} - {% endblock content %} + {% for error in form.non_field_errors %}
{{ error }}
{% endfor %} +
+ {% csrf_token %} + {% for field in form %} +
+ {% if field.id_for_label %} + + {% else %} + {{ field.label }} + {% endif %} + {{ field }} + {% if field.errors %} + {{ field.errors|join:", " }} + {% endif %} +
+ {% endfor %} + +

+ Créer mon compte +

+

+ J'ai oublié mon mot de passe +

+
+{% endblock content %} diff --git a/musik/settings.py b/musik/settings.py index b12b987..aeb5f91 100644 --- a/musik/settings.py +++ b/musik/settings.py @@ -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)