Django SAAS projects
I am almost done developing a Django project (with a few pluggable apps).
I want to offer this project as a SaaS (something like 37signals.com).
i.e: customer1.product1.com , customer2.pr开发者_开发百科oduct2.com etc
product1 could be the basecamp product2 could be highrise and so on.
I want to know how the project should be structured for these products.
Should there be a single project under which all products will be an application. ---- OR ---- Should I be making different projects for all the products.
Also interms of database.. should all the products look into a single database or we should have seperate databases for each product.
I am looking out for the most efficient and scalable way to do this.
Thanks
If you want the apps to interact in any way (e,g, share user accounts), they need to be on the same database. Until Alex Gaynor's great work on multiple database support gets merged into trunk, Django doesn't support multiple databases.
Along the same lines, Django's sites framework may be of interest to you. Without any more information about your intentions, it's difficult to give any better advice.
If you have a few big clients, giving each their own database and Django instance might make sense. Especially if you need to do customisations for them.
For a SaaS app where there are potentially lots of clients with "create your own" setup and self-service admin, you probably want one database and add subdomain support in the Django app.
Here's some good tips and code on how we did it: Handling Subdomains in Django.
There's an open source project claiming to handle a lot of the infrastructure for a basic 37Signals-like Saas site: http://github.com/saas-kit/django-saas-kit
精彩评论