Error: That IP address can't be assigned-to in Django?

前端 未结 2 764
遇见更好的自我
遇见更好的自我 2021-01-12 18:10

I am running Debian 6 stable and I am trying to run Django locally using ./manage.py runserver command. This is what I get:

Validating models...         


        
2条回答
  •  深忆病人
    2021-01-12 18:26

    That's not related to Django but to your network configuraton. The very basic loopback interface is not working properly. If you want to learn more about networking and this layer.

    Your problem is that your host cannot ping to itself, and so Django gets an error when getting the network address. That's in django/core/management/commands/runserver.py and is returned when it gets the system error 99 (EADDRNOTAVAIL).

    Your network configuration at /etc/network/interfaces should have this piece at the beginning:

    # The loopback network interface
    
    auto lo
    iface lo inet loopback
    

    Check Debian documentation for full network configuration.

提交回复
热议问题