How can i configure a separate domain for one app and another domain rest of the apps. I tried using django sites, django-host. Please share the example
Asked
Active
Viewed 107 times
1 Answers
0
Let there be 2 domains main.example.com
and rest.example.com
, and the application main_app
is to be hosted on main.example.com
and the rest of the application on rest.example.com
.
# project/hosts.py
from django_hosts import patterns, host
host_patterns = patterns('',
host('main', 'main_app.urls', name='main'),
host('rest', 'project.urls', name='rest'),
)
Considering that the rest of the application URLs is on project.urls
.

Faisal Manzer
- 2,089
- 3
- 14
- 34
-
Consider the fact that `django_hosts` only helps in choosing subdomain. – Faisal Manzer Nov 25 '19 at 13:00
-
I need two seprate domains. App1 domain - app1.com, App2 domain - app2.com – Arsh Doda Nov 25 '19 at 13:15