Re: How to make a field within a class which propose all the Ids of instances from that class

2022-02-27 Thread Sebastián Bevc Costa
A choice to the Scene model can be done with a foreign key to self: `models.ForeignKey("self", ...)`. I'm not sure what this part means though: "Several choices can lead to the same scene instance." On Sunday, February 20, 2022 at 11:34:35 AM UTC-3 stefo...@gmail.com wrote: > Hello everybody, >

How to make a field within a class which propose all the Ids of instances from that class

2022-02-20 Thread Stéphane Faure
Hello everybody, I have a class Scene. I would like to add to that model a list of choices (from 0 to n choices). Each choice would consist in an integer representing the Id of one of the existing scene instances. Several choices can lead to the same scene instance. I am not sure at all on how