[Fixed]-Django Many-To-Many relationships symmetric different types

1👍

You can also reference using related_name in the ManyToManyField. It is more cleaner and easier to understand.

class Post(models.Model):
    tag = models.ManyToManyField(Tag, related_name="post")

then you use it by
tag.post.all()

👤mking

Leave a comment