diff --git a/modules/initialize.py b/modules/initialize.py index a4579df..68fbbd1 100644 --- a/modules/initialize.py +++ b/modules/initialize.py @@ -271,9 +271,10 @@ def get_config(branchname): # # this is because I found that sometimes "extendedname" is the same # as host or as PROJECT_HOST.EXTENSION + # + # when done, convert to list and set allowedhosts to the new list - dataobject.project.django.allowedhosts = set() - _allowed = getattr(dataobject.project.django, 'allowedhosts') + _allowed = set() _allowed.add(dataobject.project.extendedname) _allowed.add(dataobject.project.host) @@ -281,6 +282,10 @@ def get_config(branchname): for allowed in config['django']['allowed_hosts']: _allowed.add(allowed) + dataobject.project.django.allowedhosts = list(_allowed) + + print(type(dataobject.project.django.allowedhosts)) + dataobject.addbranch('paths') dataobject.paths.addbranch('project')