In this section, we implement a signal handler to assign
Tag objects to
Post instances whenever a
Startup are related.
Post may be related to a
Startup in various ways, as shown in Example 25.9.
post_object.startups.add(startup_object1, startup_object2) startup_object.blog_posts.add(post_object1, post_object2)
Even though a many-to-many relationship is symmetric (if you are someone’s friend, then they are also your friend), Django defines the first relation as the forward relation, while the second is the reverse relation. Django uses this definition in our signal handler, too.
To start, we need to import our tools, ...