from django.db import models
from django.contrib.auth.models import User


class Post(models.Model):
	user = models.ForeignKey(User, null=False, blank=True, on_delete=models.CASCADE)
	text = models.TextField()
	def __str__(self):
		return f"{self.user.username} "

class Comment(models.Model):
	user = models.ForeignKey(User, blank=True, null=True, on_delete=models.CASCADE)
	post = models.ForeignKey(Post, null=False, on_delete=models.CASCADE)
	text = models.TextField()
	def __str__(self):
		return f"{user.username}"


87e590314d4c87662bd81dad693a8a938f8a74db
<mask token>


class Comment(models.Model):
    user = models.ForeignKey(User, blank=True, null=True, on_delete=models.
        CASCADE)
    post = models.ForeignKey(Post, null=False, on_delete=models.CASCADE)
    text = models.TextField()

    def __str__(self):
        return f'{user.username}'

<mask token>


class Post(models.Model):
    <mask token>
    <mask token>

    def __str__(self):
        return f'{self.user.username} '


class Comment(models.Model):
    user = models.ForeignKey(User, blank=True, null=True, on_delete=models.
        CASCADE)
    post = models.ForeignKey(Post, null=False, on_delete=models.CASCADE)
    text = models.TextField()

    def __str__(self):
        return f'{user.username}'

<mask token>


class Post(models.Model):
    user = models.ForeignKey(User, null=False, blank=True, on_delete=models
        .CASCADE)
    text = models.TextField()

    def __str__(self):
        return f'{self.user.username} '


class Comment(models.Model):
    user = models.ForeignKey(User, blank=True, null=True, on_delete=models.
        CASCADE)
    post = models.ForeignKey(Post, null=False, on_delete=models.CASCADE)
    text = models.TextField()

    def __str__(self):
        return f'{user.username}'

from django.db import models
from django.contrib.auth.models import User


class Post(models.Model):
    user = models.ForeignKey(User, null=False, blank=True, on_delete=models
        .CASCADE)
    text = models.TextField()

    def __str__(self):
        return f'{self.user.username} '


class Comment(models.Model):
    user = models.ForeignKey(User, blank=True, null=True, on_delete=models.
        CASCADE)
    post = models.ForeignKey(Post, null=False, on_delete=models.CASCADE)
    text = models.TextField()

    def __str__(self):
        return f'{user.username}'

from django.db import models
from django.contrib.auth.models import User


class Post(models.Model):
	user = models.ForeignKey(User, null=False, blank=True, on_delete=models.CASCADE)
	text = models.TextField()
	def __str__(self):
		return f"{self.user.username} "

class Comment(models.Model):
	user = models.ForeignKey(User, blank=True, null=True, on_delete=models.CASCADE)
	post = models.ForeignKey(Post, null=False, on_delete=models.CASCADE)
	text = models.TextField()
	def __str__(self):
		return f"{user.username}"

