I got a top model like Project, and many sub models like Story, Task, Bug, TestCase.
class Project(models.model):
name = models.CharField(max_length=20)
class Bug(models.model):
project = models.ForeighKey(Project, on_delete=models.CASCADE)
summary = models.CharField(max_length=20)
class Story(models.model):
project = models.ForeighKey(Project, on_delete=models.CASCADE)
summary = models.CharField(max_length=20)
class Task(models.model):
project = models.ForeighKey(Project, on_delete=models.CASCADE)
summary = models.CharField(max_length=20)
I want to seprate project as isolated workspace in admin.
when I select a project, store the current project id, and when I create sub model objects or view change list, all object is belong to this project.