0

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

Arsh Doda
  • 294
  • 4
  • 14

1 Answers1

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