Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
collectstatic during deployment generates an error message.
I try to deploy a wagtail dev project to digitalocean. Once I run the on the server the command:
python manage.py collectstatic –settings=mysite.settings.production
I get the following error message:
ALLOWEDHOSTS = os.environ.get(“DJANGOALLOWED_HOSTS”).split(“,”)
AttributeError: ‘NoneType’ object has no attribute 'split’
I follow a commands from the tutorial learnwagtail deploy to DO
I tried different type of combinations, with (’,’) and without as a split. combination of IP/*/ or without. I then tried on an empty wagtail project, the result is the same.
My intuition was that it wasn’t related to DO. Yet, google results show this happens mainly on DO, i.e. it happens during deployment.
I follow commands from the tutorial https://learnwagtail.com/launch-your-wagtail-website-digital-ocean-ubuntu-18/
I try to deploy an empty project, so only settings that are modified are in relation to deployment and digitalocean.
Any return/help would be highly appreciated.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×