Host multiple domains from a single django project
One project, multiple domains. I know I know, django already has the Sites feature built in but you can't use that to actively serve multiple domains. Django-dynamic-site-lite adds this functionality to your project.
Testing locally with apache2
(Assuming you have a django instance.)
1. Install DynamicSitesLite
sudo pip install django-dynamicsites-lite
2. Edit your /etc/hosts, add
127.0.0.1 do.main.one
127.0.0.1 do.main.two
3. Add the two domains to your django project's sites list
4. Set one of the domains as the DEFAULT_HOST in your settings.py
Both domains will serve your django project. Use request.domain in your views to detect the active domain.










