One to one relation in django
In short: it happens for OneToOneFields, not for ManyToManyFields.
A OneToOneField is actually nothing more than a ForeignKey field, but with unique=True, and some small changes (for example the reverse is not model_set, but just model, furthermore the reverse also directly results in a model object, not a queryset, since there is at most one such object). For a OneToOneField, we thus will have an fieldname_id column.
Note that in the case of a ForeignKey/OneToOneField, such column only exists where you defined the relation, not at the targeting model. If A has a OneToOneField to B, then you can query b_id, but there does not exists a a_id on the B model.
For a ManyToManyField that is not the case. Such relation is not represented in the column of that table, but by a separate table (that links to the two models in the relation).
You are using a Foreign key in Django models automatically _ id is added to the respective field while saving in db.
Is the same happend to one to one and many to many relations in Django models?