Skip to content

Conversation

@vkovaliovskyi
Copy link
Collaborator

Here i added replies for comments but i dont add animation for forms

@@ -0,0 +1,18 @@
# Generated by Django 3.0.6 on 2020-05-18 06:40
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad name for migrations

text = models.CharField(max_length=250)
comments_date = models.DateTimeField(default=timezone.now)
likes = models.ManyToManyField(User, blank=True, related_name='liked_comments')
reply = models.ForeignKey('self', on_delete=models.CASCADE, null=True, blank=True, related_name='replies')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, once again. A comment may have only one reply ?

text = models.CharField(max_length=250)
comments_date = models.DateTimeField(default=timezone.now)
likes = models.ManyToManyField(User, blank=True, related_name='liked_comments')
reply = models.ForeignKey('self', on_delete=models.CASCADE, null=True, blank=True, related_name='replies')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

request.user.friends # => ProfileModel.objects.all()
request.user.profile.friends # => User.objects.all()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants