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

356
Views
How to implement notification service using Django Channels in a chat application?

I am working on chat application based on django, but for real time notifications and chatting, I plan on using django channels. The problem is that apart from documentation there are hardly any resources available to get in-dept knowledge of the concepts.

Can anyone suggest a way to implement notifications in my application as when a user receives a message, he/she gets notified(using websockets concept).

Also, I plan on using channels as a way to display which of the users are currently online.

Models are as follows :

class Person(models.Model):
    user = models.OneToOneField(User)
    name = models.CharField(max_length=50)
    contact = models.CharField(max_length=12)
    online = models.IntegerField(default=0)

    def __str__(self):
        return self.name

class Dialog(models.Model):
    author = models.ForeignKey(Person,related_name="self")
    reader = models.ForeignKey(Person)

    def __str__(self):
        return self.author.name + " - " + self.reader.name

class Message(models.Model):
    dialog = models.ForeignKey(Dialog)
    sender = models.ForeignKey(Person)
    text = models.TextField()

    def __str__(self):
        return self.sender.name + " : " + self.text

I have been stuck with this problem for a while now. I would be grateful if anyone can suggest a solution.

Thanks in advance.

over 4 years ago · Santiago Trujillo
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!