This question aims for best practises. So I have a model A and model B. model B has model A as foreign key but whenever a new instance of model A is created a new instance of model B has to be created and linked with that instance of model A.
Currently I have resolved the circular dependecy by referencing all foreign key models with strings and I override the save function of model A to check if a link to model B is already present and if not it creates one. But I'm not sure if this is the best thing to do.
Should I use a signal instead, so that whenever model A is saved a signal is received by post_save which checks if that instance already has a model B instance linked to it and if not creates it?
My only concern with signals is that they seem to take some time and I have to be sure that model B instance is created immediately.