tags:

views:

41

answers:

2

alt text

Please see the folder structure image in the above url mentioned please advice which structure would be best suited for better code managibility. If the above image is not gettign please use this url http://www.freeimagehosting.net/image.php?387990357b.jpg

+1  A: 

As far as automated deployment goes, It would appear to me that your second option would be better... that will allow you to "pick up" either site 1 or site 2 all at once and drop it anywhere you want.

Matthew J Morrison
thanks Matthew, but doubt in that case for having a global settings file shared by sites I have to keep a settings module in the root directory am I right?
Joseph
not necessarily - you could have a "global settings" file anywhere on the file system (as long as it is on your PYTHONPATH) - each individual site's settings.py can just import * from your global one and set site specific settings.
Matthew J Morrison
So as per our new change we need to make use of the same model for all the sites. since all the sites will be sharing the same databases involved. SO we are planning to keep the model.py file in the common directory for sharing between all the sites, Please advice whether keeping the models.py file in a globally shared folder will be a right choice?
Joseph
If you only have a single database, why not just keep all of the "sites" in the same django project?
Matthew J Morrison
A: 

I use virtualenv to manage multiple sites, which is basically an extension of the second option: each with their own code base and settings file and modules.

Andrew Sledge
Hi, did you mean using Env variable in Apache virtual host for managing the multiple site using mod_wsgi...? If then please elaborate how you are implementing it
Joseph
No, virtualenv: http://pypi.python.org/pypi/virtualenv
Andrew Sledge