django Error: That IP address can‘t be assigned to

created at 06-25-2021 views: 535

Operating environment:

  • System: Ali Cloud Ubuntu 18.04.3 LTS (GNU / Linux 4.15.0-52-generic x86_64)
  • python: python3
  • mysql: 5.7.27-0ubuntu0.18.04.1 (Ubuntu)
  • mysql-client: 5.7.27-0ubuntu0.18.04.1 (Ubuntu)

error description:

when launch the Django program (python runserver), getting this error:

That IP address can't be assigned to.


Set ALLOWED_HOSTS in, such as

ALLOWED_HOSTS = ['','localhost', '', '','']

Then change python runserver to python runserver 0:10001 (10001 is an open port) when startup. 

problem solved.

created at:06-25-2021
edited at: 06-25-2021: