On 10 jan, 22:00, Josh Ourisman <[EMAIL PROTECTED]> wrote:
> 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.

Why you don't define the M2M relationship in the same model where the
Foreign Key is defined?
You will have dependence in only one direction: So no cross-reference
problems, and your applications will be more independents too ?

--~--~---------~--~----~------------~-------~--~----~
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