had to reset allowed hosts to a type list, bc when it gets generated into the django settings file as a type set, it cannot be read by the django library
This commit is contained in:
parent
2f71995f39
commit
8e0afa1133
1 changed files with 7 additions and 2 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue