Learn Django - The Easy Way | Comments & Replies - Part 1 | Tutorial - 45

preview_player
Показать описание
In this video lecture, we will allow the user to reply over the particular comment that user commented. You can assume the comment and reply as a parent-child relationship. This means a single comment can have multiple replies from different users.

Find the links below to connect with me:

Рекомендации по теме
Комментарии
Автор

hi abhisek, i got this error
reply = models.ForeignKey('self', null=True, related_name= 'replies', )
TypeError: __init__() missing 1 required positional argument: 'on_delete'
then i have added on_delete='models.CASCADE'
now i get this error
ValueError at /home/post/17/
Cannot assign "'hey'": "Comment.reply" must be a "Comment" instance.

princenihith
Автор

But in django3.0 it's not working please help

FahadAli-otkn