On Mar 18, 10:50 am, Malcolm Tredinnick <malc...@pointy-stick.com>
wrote:
> On Wed, 2009-03-18 at 10:48 +1100, Joshua Partogi wrote:
> > Dear all,
>
> > Currently I have a project in which the model will be used by several
> > django application. What is the best practice to define this model?
>
> > Let's say I have a category model that will be used from the blog
> > application and also product application. Do we define that model in
> > either one of the application, and the others will call it? Or should
> > we define the category model in every application?
>
> Why not put it in its own application that the other applications can
> all refer to?
>
> You could put it in one or the other of your existing applications if
> having a dependency of "blog" on "product" at the app-level makes sense.
> But I'd put the common stuff into their own application so you don't
> wonder in three months why "blogs" are dependent on "products", when
> they're not the same thing.
That seems to be a very good idea malcolm. So from your experience I
should define an application something like "common" and just define
the common model like category in there, and let other application
that is dependant on it to call it? Any drawback from this approach
you've found so far?
Thank you very much in advance.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---