-
Notifications
You must be signed in to change notification settings - Fork 5
Issue 5 #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Issue 5 #19
Conversation
joausaga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dejé nuevos comentarios y solicitudes de cambio
joausaga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revisado con sugerencias de cambios
app/migrations/0019_scientist_notify_end_abroad_period_has_ended.py
Outdated
Show resolved
Hide resolved
joausaga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Añadí comentarios a las conversaciones existentes
app/email.py
Outdated
| return email.send() | ||
|
|
||
| def daily_verification_of_registrants_whose_period_abroad_has_ended(): | ||
| scientists=Scientist.objects.filter(approved=True).filter(end_abroad_period=date.today()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No sé que pasa pero yo no veo ningún cambio aquí e insisto en que ese filtro no es del todo correcto por lo que expliqué antes. Cuando me decis done a que te referis?, porque no me sale que hayas cambiado nada.
joausaga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sugerencia de refactorización de código para evitar prácticas que van en contra del principio DRY (https://en.wikipedia.org/wiki/Don%27t_repeat_yourself)
joausaga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cambios revisados y nuevas sugerencias de cambio agregadas
joausaga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cambios revisados. Se agregó nuevas sugerencias de cambio y comentarios sobre dudas en la implementación.
joausaga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revisión finalizada. Se agregaron sugerencias de cambio y nuevos comentarios
El test json : data/data_test_issue_5.json
2 Task nuevos
def daily_verification_of_registrants_whose_period_abroad_has_ended_task() // Verifica el campo end_abroad_period, si coincide con el dia actual, envia un mail aviso
def disabled_scientist_end_period_past_a_month(): //Revisa el campo end_abroad_period, Si la fecha se cumplio +30 dias se los deshabilita(approved = false)
###Hay dos formas de indicar el periodo de ejecucion de esta tareas
La primera es utilizando el admin de django



Se crea un nuevo "Periodic Task"
(Se ejecutara todos los dias a las 19:25 UTC)
La segunda forma es con codigo:
Se descomenta esta seccion. (Se ejecutara todos los dias al 18:17 y 18:19 los task)

Para el caso unico de enviar el mail a todos los usuarios de actualizar los datos
app/task.py - >send_mail_to_update_expected_date_of_return():
Se puede entrar al shell con python manage.py shell, importar la funcion y ejecutarla
Nuevo Formulario
(Si indica que es permanente residente, el input date no aparece)
Test JSON
Para el test json se debe modificar los mail a mails valido de los scientist Test 1,2,3. Tambien actualizar la fecha del campo end_period_abroad al fecha actual a la que se hace el test.
Temporaly Emails service:
https://temp-mail.org/es/
https://www.emailondeck.com/eod.php
https://www.guerrillamail.com/es/inbox