# Django "Sites Framework" in development

**URL:** https://forum.djangoproject.com/t/django-sites-framework-in-development/9536
**Category:** Using Django
**Created:** [September 2, 2021, 10:14pm UTC](https://forum.djangoproject.com/t/django-sites-framework-in-development/9536 "2021-09-02T22:14:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Rigo-Villalta](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/rigo-villalta/32/5667_2.png) [@Rigo-Villalta](https://forum.djangoproject.com/u/Rigo-Villalta)
#### Post date: [September 2, 2021, 10:14pm UTC](https://forum.djangoproject.com/t/django-sites-framework-in-development/9536/1 "2021-09-02T22:14:40Z")

</div>

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:

1. How to manage multiple domains in development?
2. Is it possible to use subdomains as domains?
3. 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.

---

<div class="post-metadata">

### Author: ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)
#### Post date: [September 2, 2021, 10:55pm UTC](https://forum.djangoproject.com/t/django-sites-framework-in-development/9536/2 "2021-09-02T22:55:57Z")

</div>

> [@Rigo-Villalta](#):
>
> How to manage multiple domains in development?

What do you mean by this? Why would development be any different for this than production, or development for any other project?

> [@Rigo-Villalta](#):
>
> Is it possible to use subdomains as domains?

Yes. To the extent of my experience, there’s nothing saying that a “site” must be mapped to only a 2-level name.

> [@Rigo-Villalta](#):
>
> 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?

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.

---

<div class="post-metadata">

### Author: ![Rigo-Villalta](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/rigo-villalta/32/5667_2.png) [@Rigo-Villalta](https://forum.djangoproject.com/u/Rigo-Villalta)
#### Post date: [September 2, 2021, 11:01pm UTC](https://forum.djangoproject.com/t/django-sites-framework-in-development/9536/3 "2021-09-02T23:01:07Z")

</div>

Thanks @KenWhitesell

> [@KenWhitesell](#):
>
> What do you mean by this? Why would development be any different for this than production, or development for any other project?

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.

---

<div class="post-metadata">

### Author: ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)
#### Post date: [September 2, 2021, 11:22pm UTC](https://forum.djangoproject.com/t/django-sites-framework-in-development/9536/4 "2021-09-02T23:22:44Z")

</div>

Oh, ok.

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.
