Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

141
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!