Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

147
Vistas
Web-sockets & Django

This is a table of posts, I want to update the status(red highlighted) whenever a user comments on a post. I used WebSockets to show real-time comments on the page(if the tab is open comments will show without page refresh). But if a user posts a comment I want to update this status in real-time.

enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

had you look this post?

Django-channels sending message when model changes

You can use something like this:

from django.db import models
from django.dispatch import receiver

...

@receiver(models.signals.post_save, sender=Comment)
def send_comment(sender, instance, **kwargs):
    async_to_sync(channel_layer.group_send)("chat_name", {"type": "send_comment"})

You can find more signals options at Django signals and more about channel layers outside of consumers at here

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda