开发者

Can multiple Django sites share memory?

I'm using Apache + mod_wsgi daemon mode for running a Django site. When another site is added (new v开发者_C百科irtualhost), 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)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜