Hello,
I recently cut my models.py into separate files and now I try to fix all the problems with imports that showed up. I hit the wall on this one though.
Purpose of the application is to process a text file with instructions and fit them into hierarchical structure like this:
Program <- Node <- Commands
Program has many Nodes, Nodes has many commands.
One of the possible Commands is jumping into subprogram. I want to get url of that subprogram, so I can show it in a template.
During analysis Program calls Node to create nodes. Node then calls Command to create Commands.
Then later Command takes the id of the subprogram and call Program.objects.get().get_absolute_url()
How can I break this import chain?
Best regards,
Daniel