I followed the steps by this reference link Multiple Sites in Django and configured in apache .but one thing how to call those domains in templates
If I type the domain names directly in the address bar it's working. But want to server through links(<a href="">Domain1</a>
)
for both separate settings.py and wsgi.py as mentioned above.
I have a separate urls for both.
domain1_urls.py
from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
url(r'^$', 'domain1.views.domain1', name='domain1'),
)
domain2_urls.py
from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
url(r'^$', 'domain2.views.domain2', name='domain2'),
)
index.html
<li><a href="{% url 'domain1' %}">domain1</a></li>
<li><a href="{% url 'domain2' %}">domain2</a></li>
The landing page is domain1. In the landing page template, there is a link for domain2. If I click that it's simply redirecting to domain1 itself. It's not working for me, Both URLs Domian1 and Domain 2 servers '/' how to differentiate both while calling in templates on a common index.html.
Please tell me what mistake I made here. If any suggestion please let me know.Thanks in advance.