From 51b7eaa94273e7b9cd6e9400352b251e31378ad7 Mon Sep 17 00:00:00 2001 From: Oliver Falk Date: Tue, 12 Jun 2018 09:18:57 +0200 Subject: [PATCH] Allow local hostname as well for allowed_hosts --- config.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config.py b/config.py index 0b480f9..63d1a9e 100644 --- a/config.py +++ b/config.py @@ -1,10 +1,17 @@ +''' +Configuration overrides for settings.py +''' + import os -from ivatar.settings import BASE_DIR +from socket import gethostname, gethostbyname from django.urls import reverse_lazy +from ivatar.settings import BASE_DIR ADMIN_USERS = [] ALLOWED_HOSTS = [ 'localhost', + gethostname(), + gethostbyname(gethostname()), ] from ivatar.settings import INSTALLED_APPS # noqa