I am development an app for a SAAS project. I am facing the multiple choices for manage multiple customers. One option is use the built-in “Sites Framework”, but I think there is a lack of documentation. Some questions I have are:
- How to manage multiple domains in development?
- Is it possible to use subdomains as domains?
- I would like to extend the Site model in order to add some fields, but that could break a lot of the built-in behavior. Do you think this is a good approach?
Another option that I am managing is to use the “Sites Framework” like example and built my own Tenants app.
Someone has experience with a similar situation and can give me advice about it?
Any help is welcome.
What do you mean by this? Why would development be any different for this than production, or development for any other project?
Yes. To the extent of my experience, there’s nothing saying that a “site” must be mapped to only a 2-level name.
Probably not - the generally recommended practice is to create a related model, one with a OneToOne relationship with the base model. That lets you add whatever functionality is needed without affecting the existing model.
In development I use to use only 127.0.0.1 as I think is the standard practice, how do you manage that in development.
Thanks for the other answers it makes very clear the path to follow in this aproach.
You can change your
hosts file to locally assign dns names to addresses. (
/etc/hosts on Unix-style systems and usually
c:\Windows\System32\drivers\etc\hosts on Windows) You can assign any number of host names to any arbitrary address - your system will check that file before issuing a network-based DNS request.