views:

87

answers:

1

I am creating multisites platform. Anybody can make simple site, with my platform. I plan to use django multidb support. One db for one site. And i need to change db settings depending on request.get_host(). I think that i's not good idea. Prompt other decisions? How it is realised on various designers of sites?

+1  A: 

You might want to reconsider using a separate db for reach site. In reviewing the multi-db source, it looks like you'll run into a few scalability issues, depending on how many sites you want to support:

Currently all the databases are set up in settings.py. This could cause a few issues:

  • Each new site would require reloading Django.
  • settings.py could get large.

A better approach might to use a single DB and associate the site/account with each record as needed.

Chip Tol
I don't know how many sites will be created.
Alexandr
If it's low, and you're doing it manually, you're probably OK; otherwise, I would use a different strategy.
Chip Tol