Say that there's an excellent 3rd party app "articles" with a model
Article and another most excellent 3rd party app "polls" with a model
Poll. How do you glue them together?

If an Article may have several Polls and a Poll may be used in several
Articles, you can glue them together with a new model with a foreign
key to each of Poll and Article. But where do you place these glue
models? Some possibilities are:

1. monkey patch or fork one or both of the 3rd party apps. Then you
have a problem when there's a new upstream version of the
patched/forked app.
2. make an app "articlepoll" to hold the ArticlePoll model. This app
can then be reused by other projects, but you might wind up with
zillions of them.
3. make an app "glue" for ArticlePoll and any other glue models you
need. This app is then 100% project-dependent.
4. treat the project as an app and add the glue models there.
...
last. a combination of the above.

What other possibilities are there? What is best practice?

I'm refactoring and upgrading a project that is very fond of option 1
at the mo' and there *must* be a better way.


HM

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to