Esempio n. 1
0
def _send_push_response_propuesta(usuarios_id, propuesta):
    en_msg = "The organization answered your proposal to " + propuesta.evento.nombre
    es_msg = "La organización respondió a tu propuesta para " + propuesta.evento.nombre
    from common.notifications import send_push_notification_to_id_list
    send_push_notification_to_id_list(usuarios_id, "Proposal answer",
                                      "Respuesta a su propuesta", en_msg,
                                      es_msg)
Esempio n. 2
0
def __send_fin_push(colaboradores_id, organizacion_id, evento, cron_exec):
    colaboradores_id.append(organizacion_id)
    en_msg = "The campaign " + evento.nombre + " has finished" if evento.campaña else "The event " + evento.nombre + " has finished"
    es_msg = "La campaña " + evento.nombre + " ha finalizado" if evento.campaña else "El evento " + evento.nombre + " ha finalizado"
    send_push_notification_to_id_list(colaboradores_id,
                                      "Activity finished",
                                      "Actividad social finalizada",
                                      en_msg,
                                      es_msg,
                                      thread_daemon=not cron_exec)
Esempio n. 3
0
def __send_inicio_push(colaboradores_id, organizacion_id, evento, cron_exec):
    colaboradores_id.append(organizacion_id)
    en_msg = "The campaign " + evento.nombre + " has started" if evento.campaña else "The event " + evento.nombre + " has started"
    es_msg = "La campaña " + evento.nombre + " ha comenzado" if evento.campaña else "El evento " + evento.nombre + " ha comenzado"
    send_push_notification_to_id_list(colaboradores_id,
                                      "Activity started",
                                      "Inicio de actividad social",
                                      en_msg,
                                      es_msg,
                                      thread_daemon=not cron_exec)
Esempio n. 4
0
def notify_cambio_propuesta(propuesta):
    subject_utf = u"Cambio de una propuesta en Helpo"
    from common.templates import render_cambio_propuesta
    content = render_cambio_propuesta(propuesta)
    from common.notifications import send_mail_to_id, send_push_notification_to_id_list
    send_mail_to_id(id_to=propuesta.evento.organizacion.id,
                    html_subject=subject_utf,
                    html_content=content)
    en_msg = "Proposal to " + propuesta.evento.nombre + " has been changed"
    es_msg = "La propuesta a " + propuesta.evento.nombre + " ha sido modificada"
    send_push_notification_to_id_list([propuesta.evento.organizacion.id],
                                      "Proposal changed",
                                      "Cambio en una propuesta", en_msg,
                                      es_msg)
Esempio n. 5
0
def _send_push_propuesta(usuarios_id, propuesta):
    en_msg = "The campaign " + propuesta.evento.nombre + " has a new proposal" if propuesta.evento.campaña else "The event " + propuesta.evento.nombre + " has a new proposal"
    es_msg = "La campaña " + propuesta.evento.nombre + " tiene una nueva propuesta" if propuesta.evento.campaña else "El evento " + propuesta.evento.nombre + " tiene una nueva propuesta"
    from common.notifications import send_push_notification_to_id_list
    send_push_notification_to_id_list(usuarios_id, "New proposal",
                                      "Nueva propuesta", en_msg, es_msg)
Esempio n. 6
0
def _send_push(usuarios_id, evento):
    en_msg = "The campaign " + evento.nombre + " has changed" if evento.campaña else "The event " + evento.nombre + " has changed"
    es_msg = "La campaña " + evento.nombre + " ha sido modificada" if evento.campaña else "El evento " + evento.nombre + " ha sido modificado"
    send_push_notification_to_id_list(usuarios_id, "Activity changed",
                                      "Cambio en actividad social", en_msg,
                                      es_msg)