It's for the purpose of defining foreign keys. Basically, ClassA1
needs to be able to reference ClassB1 and ClassB2 as foreign keys,
while ClassB3 needs to reference ClassA1 as a foreign key.

More specifically, the project has (among others) a news application
and a portfolio application. An item of news might reference multiple
items from the portfolio application, so we define a m2m relationship
between the news item class and the appropriate portfolio classes
(there are two that are relevant). At the same time, in the portfolio
we want to be able to link to any relevant news items, but we _also_
want to provide a way to prevent specific news items from showing up
when looking at certain portfolio items. So it's not sufficient to
just look at the news items related to a portfolio item through the
existing m2m relationship, we also have to be able to define a
separate list of news items.

It's a little unnecessarily complex, I know, but it's what the client
wants and, if at all possible, I'd like to do it this way rather than
having to justify a change in functionality to the client.

On Jan 10, 3:19 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> Hi,
>
> On Jan 10, 12:54 pm, Josh Ourisman <[EMAIL PROTECTED]> wrote:
>
> > I have two models, modelA and modelB. ModelA needs classB1 and classB2
> > from modelB, while modelB needs classA1 from classA.
>
> Can you explain what you mean by "needs"? Is there a class method in
> modelA that needs to instantiate/call classB1? Better yet, include a
> short code snippet showing how ModelA needs classB1 and classB2.
>
> -Rajesh D
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to