Donn wrote: > Okay, I am totally confused. > I had a working system before, but trying to relate my models is hurting my > head. If anyone has a minute here's my scheme: > > == means has many > -- means has one > > Client == Website -- pluginsEnabled == Plugin > > 1. I create many Plugin entries first. > 2. I create a Client, who does not need a Website yet. > 3. I create a Website, which then can get a pluginsEnabled "set" > 4. I then add Plugin(s) to the set. > > Right now I can't make head or tails of it. I keep getting errors to the > effect that one thing has no foreign key to another. It worked in my old way > but the admin had that issue in my OP. > I'm on a train now, so you may have an answer to your question by the time this email escape, but it seems to me that if each Website can have a single Plugin then the Website model just needs a ForeignKey into Plugin to record which Plugin has been selected for that Website.
So, as Karen already said, there really doesn't seem to be any need for a "pluginsEnabled" module. The foreign key implements a one-to-many relationship between Website and Plugin: many Plugins can have the same Website, each Website is associated with exactly one Plugin. Is that what you need? regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---