On 26 sep, 21:10, Robert <[EMAIL PROTECTED]> wrote: (snip)
> > On Sep 26, 1:39 pm, Rock <[EMAIL PROTECTED]> wrote: > > > > It may be as simple as creating an intermediary field between Document > > > and agency called Study. (See the Django docs regarding adding extra > > > fields to a many-to-many relationship.) > I freely admit my biggest problem is that I am quite used to thinking > in terms of classes, and almost not at all in terms of database > schema. "the results of an higher education..." (F.Zappa) Not to start a troll, but when it comes to domain modeling, OO is IMHO a regression wrt/ the relational model - even if SQL dbms are pretty bad when it comes to graphs and/or polymorphic relationships. Anyway... back to your problem: required_docs = [] for country in study.countries: ____for agency in country.agencies: ________for document in agency.documents: ____________required_docs.append(document) I derive from this that the required set of documents for a given agency doesn't depend on the study ? If so, what's the meaning of "a document is created for that study" and "the same document created for a different study" ? FWIW, I suspect there's something wrong in the definition of "document" (FWIW, you didn't defined what a "document" is at all). If you're more at ease with OO modeling (and then UML), could you post an UML class diagram of your domain somewhere ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---

