views:

82

answers:

1

I'm using Apache + mod_wsgi daemon mode for running a Django site. When another site is added (new virtualhost), a second daemon appears.

Is there any way to let those sites share the same proces / memory? It seems to wasteful to have ~20MB persistently in use per site.

Bonus points: how does this compare to PHP hosting? (especially Drupal/Joomla)

+1  A: 

Have a look at Django sites framework.

http://docs.djangoproject.com/en/dev/ref/contrib/sites/

Other than that, the answer is no, as Django use global variables for configuration and so not possible to have same code base dynamically switch what site it runs as on a per request basis.

Graham Dumpleton