diff --git a/back_latienda/settings/development.py b/back_latienda/settings/development.py
index af1f405..c8b6f9d 100644
--- a/back_latienda/settings/development.py
+++ b/back_latienda/settings/development.py
@@ -52,6 +52,15 @@ SIMPLE_JWT = {
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
+# For testing emails
+# https://medium.com/@_christopher/how-to-send-emails-with-python-django-through-google-smtp-server-for-free-22ea6ea0fb8e
+# EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
+# EMAIL_HOST = 'smtp.gmail.com'
+# EMAIL_USE_TLS = True
+# EMAIL_PORT = 587
+# EMAIL_HOST_USER = '' # your email account
+# EMAIL_HOST_PASSWORD = '' #your password
+
# disable web interface for REST backend
# REST_FRAMEWORK['DEFAULT_RENDERER_CLASSES'] = ('rest_framework.renderers.JSONRenderer',)
diff --git a/core/utils.py b/core/utils.py
index ad0f96e..ae85804 100644
--- a/core/utils.py
+++ b/core/utils.py
@@ -71,12 +71,13 @@ def create_admin_user(email, password):
def send_verification_email(request, user):
try:
current_site = get_current_site(request)
+ uid = urlsafe_base64_encode(force_bytes(user.pk))
+ token = account_activation_token.make_token(user)
+ verification_url = 'https://' + current_site.domain + '/activate/' + uid + '/' + token
subject = 'Activa Tu Cuenta'
message = render_to_string('email_verification.html', {
'user': user,
- 'domain': current_site.domain,
- 'uid': urlsafe_base64_encode(force_bytes(user.pk)),
- 'token': account_activation_token.make_token(user),
+ 'verification_url': verification_url
})
email = EmailMessage(
subject, message, to=[user.email]
diff --git a/templates/email_verification.html b/templates/email_verification.html
index db8a15e..43d57b2 100644
--- a/templates/email_verification.html
+++ b/templates/email_verification.html
@@ -209,7 +209,7 @@
height="auto"
width="25"
align="left"
- src="https://latienda.coop/_nuxt/img/latienda-logo.3e53761.svg"
+ src="https://latienda.coop/_nuxt/img/latienda-logo.dea6549.png"
style="
border: none;
display: block;
@@ -485,12 +485,12 @@
"
>
Hola {{ user.full_name }},
-
+
Por favor, verifica tu
registro en LaTiendaCOOP
- haciendo click AQUĆ
+ haciendo click en el siguiente enlace:
+
+ {{verification_url}}
+ {% endif %}
@@ -729,18 +736,28 @@
+ {% endif %}
+ {% endif %}
@@ -941,7 +948,7 @@
>