title: When using sub-domains for a Django site, how can you share django logins across sub-domains on localhost?
body: <p>I want to let the same user session span across:</p>
  <ul>
  <li>site.com</li>
  <li>sub1.site.com</li>
  <li>sub2.site.com</li>
  </ul>
  <p>I got this to work in production by setting <code>SESSION_COOKIE_DOMAIN</code> to &quot;.site.com&quot;, but it doesn't work for me on localhost/dev servers. How do you get it to work for localhost sub-domains? When I change the <code>SESSION_COOKIE_DOMAIN</code> on the dev server to the production website domain or &quot;.localhost&quot;, django auth logins completely stop working (I'm unable to ever login, no cookie is created on localhost).</p>