When starting Django project, we encountered: error: [errno 11001] getaddrinfo failed error
You can run the following command in Ubuntu, but if you transfer the project to windows 10, there will be an error:
# --insecure argument to force django to process static files, when closing debug is added (--insecute)
python manage.py runserver 0:8000 --insecure
# or
python manage.py runserver 0:8000
Debug code in settings.py file
DEBUG = False
ALLOWED_HOSTS = ["*"]
Run the following command in Windows 10 to solve the problem
python manage.py runserver 0.0.0.0:8000 --insecute
# or
python manage.py runserver 0.0.0.0:8000
Similar Posts:
- Django exception-ImportError: No module named django.core.management
- Linux Implement Django Error: nohup: ignoring input and appending output to ‘nohup.out’
- [Solved] You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for…
- Django Use logging Module Cannot Operate the File Error: logging error Permission Error [WinError 32]
- [Solved] Django cannot create an app after creating a project
- Error modulenotfounderror when starting Django: no module named ‘pytz’
- You may need to add ‘192.168.55.10’ to ALLOWED_HOSTS.
- ERRORS: ?: (staticfiles.E002) The STATICFILES_DIRS setting should not contain the STATIC_ROOT set…
- Django Run Error: RuntimeError: maximum recursion depth exceeded while calling a Python object
- ImportError: Couldn’t import Django [How to Solve]