[Answer]-App as foreign key

1👍

I think you should do that:

# blog/models.py

class Blog(Model):
    owner = ForeignKey(User, related_name="blogs")
    name = Charfield()

class Post(Model):
    blog = ForeignKey(Blog, related_name="posts")
    #Other fields ...

class Comment(Model):
    post = ForeignKey(Post, related_name="comments")
    #Other fields ...

Leave a comment