Re: more model basics - mny to many's

2006-02-14 Thread gizo
ah, looks clever, i like that. I'll check it when i get into work. thanks...

Re: more model basics - mny to many's

2006-02-14 Thread Jacob Kaplan-Moss
On Feb 14, 2006, at 9:55 AM, gizo wrote: Each Song can have Many Player/Instrument combinations (where each musician could play any instrument, in theory) Give this a shot:: class Musician(meta.Model): ... class Instrument(meta.Model): ...

Re: more model basics - mny to many's

2006-02-14 Thread gizo
wont that just give me: Each Song can have many Instruemtns Each Song can have many Musicians? what I want is: Each Song can have Many Player/Instrument combinations (where each musician could play any instrument, in theory)

Re: more model basics - mny to many's

2006-02-14 Thread patrick k
what do you need the table songInstrument for? i´d suggest using a many-to-many relationship ... see http://www.djangoproject.com/documentation/model_api/#many-to-many-relations hips class song(meta.Model): title = ... duration = ... instrument = meta.ManyToManyField(instrument) musician =

more model basics - mny to many's

2006-02-13 Thread gizo
Hiya. I am not a web developer, okay, just trying to do a band website (so take it easy on me, please ;) I am having trouble with my models. I have the following: class musician(meta.Model): ... class instrument(meta.Model): ... class song(meta.Model): .. class