Re: Many-to-many through multiple tables

2009-11-28 Thread Jonathan
The BusinessVersion isn't relevant, I posted the whole model to put it in context. It's a web app to track software through the software development lifecycle. Regardless of the lifecyle stage (development, test, production), all instances of an application consist of the same Group of packages (p

Re: Many-to-many through multiple tables

2009-11-28 Thread t0ster
May be Group should include packages of specific versions: class Group(models.Model): name = models.CharField(max_length=100) product = models.ForeignKey(Product) -packages = models.ManyToManyField(Package) +packages = models.ManyToManyField(PackageVersion) class Profile(models.M

Re: Many-to-many through multiple tables

2009-11-28 Thread Jonathan
Hi, I've slimmed it down to the relevant fields. I'm a bit of a noob, but I think I'm basically trying to build a generic framework that can be made specific in a profile. Profile = BusinessVersion + Group + LifecycleStage + Package.Versions Jonathan class Product(models.Model): name = mode

Re: Many-to-many through multiple tables

2009-11-28 Thread t0ster
Could you post your models.py code here? On Nov 28, 1:10 pm, Jonathan wrote: > This may be more of a general database design question, but I want to > come up with something that works with Django's ORM. > > I have four bits of information that I want to link together. Generic > packages, package