master
ifiguero 2024-07-30 13:43:31 -04:00
parent 147e5e3126
commit 8af4239459
2 changed files with 4 additions and 4 deletions

View File

@ -79,10 +79,10 @@ def recuperar(request):
usuario = models.Usuario.objects.filter(rut=rut, vigente=True).first()
if usuario == None or persona == None:
return HttpResponse('Acceso no valido 3', status=400)
return HttpResponse('El usuario no existe', status=400)
if persona.email != input['email'].lower():
return HttpResponse('Acceso no valido 4', status=400)
return HttpResponse('El correo electrónico no es el registrado para el usuario', status=400)
codigo_aleatorio = random.randint(100000, 999999)
ahora = datetime.utcnow()

View File

@ -181,10 +181,10 @@ LOGGING = {
EMAIL_HOST = config('SMTP_HOST')
EMAIL_PORT = config('SMTP_PORT', 587)
EMAIL_PORT = config('SMTP_PORT')
EMAIL_SENDER = config('SMTP_FROM')
#EMAIL_HOST_USER = config('SMTP_USER', 'tu_correo@gmail.com') # Tu dirección de correo
#EMAIL_HOST_PASSWORD = config('SMTP_PASS', 'tu_contraseña') # Tu contraseña de correo
EMAIL_USE_TLS = config('SMTP_PROTOCOL') == 'plain'
EMAIL_USE_TLS = config('SMTP_PROTOCOL') == 'tls'