I take a different approach. While generic keys are the best solution they
are not easy to work with. I like to start with using a foreign key to
whichever model and if the app is successful and I want to make it
pluggable, I'll refactor it to use generic keys.
IMO, It's OK for your project-specific apps to depend on each other. I just
try to keep the dependencies clear, so I don't get spaghetti code and coding
can be distributed.

2009/9/1 Shai Berger <[email protected]>

>
> I think the recommended approach is to avoid coupling applications. This
> means
> you should not change the other app nor do o2o mentioning it explicitly,
> but
> write your extending model so that it's compatible with any model (or,
> perhaps, any model which supplies some interface) and use a generic foreign
> key. This is the approach taken in django.contrib.comments and
> django-tagging,
> if I'm not mistaken.
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"PyWeb-IL" 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/pyweb-il?hl=en
-~----------~----~----~----~------~----~------~--~---

_______________________________________________
Python-il mailing list
[email protected]
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il

לענות