views:

173

answers:

2

Hi SO,

I have created a complex E-R diagram for a django site I'm developing. It maps to 11 tables in the database. The site has many features, so I would like to split it into multiple apps. The Django manual said that Django apps should be pluggable, but if I split the models into many apps, they would be dependant on each other. Is this a good practice? If not, how should I structure my application?

Thanks

+1  A: 

Hey man,

You could separate them out into self contained apps, and they would work within the context of your project.

You could also create each app so it's totally independent. This often takes a bit more work, a nice example of this is Django-tagging, which you can basically attach to any other object.

So yes, you can do it. However if the app is just for you it may not be worth the effort (IMHO) ;)

izzy
+1  A: 

I wouldn't worry over the statement about making apps pluggable. Sure, if it could be a useful app in other projects, you may want to - but nothing enforces this.

There is no harm in making internal apps dependent.

Personally, my project-specific apps live inside the project module (or for larger projects, inside a project.apps module). This way, you're not polluting the python import namespace with your one-time apps.

SmileyChris
That's a good idea.
Tamás Szelei