Django ALLOWED_HOSTS

After you installed Django and wanted to view it from another local machine you got this error:

DisallowedHost at / Invalid HTTP_HOST header: ‘192.168.3.20’. You may need to add u’192.168.3.20′ to ALLOWED_HOSTS.

I use this to work around it.

Run as:

Open the settings:

Change and add:

Now everything and anyone on your local network should have acces to the website.
^that’s also a big warning!

Leave a Reply

Your email address will not be published. Required fields are marked *