I’m working on a Django app which is able to serve content on a number of subdomains. The app has a number of sites, which appear as subdomains of the main domain. There’s some middleware to look things up from the request and do the right routing.
In the wild the subdomains will be done with DNS, but for local development, I’m creating entries in my /etc/hosts such as demosite.local, using .local as my ‘main domain’ locally. After a colleague integrated some authentication code, I suddenly found I couldn’t log in on my development environment. It didn’t work with either the custom login screen or the Django admin. Very odd.
Read more →