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

前端 未结 2 766
遇见更好的自我
遇见更好的自我 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:35

    You are missing two lines of code in network configuration file. Edit the file as a root user with any text editor:

    sudo gedit /etc/network/interfaces
    

    Add these two lines:

        auto lo
    
        iface lo inet loopback
    

    Restart the network using the following command:

    sudo /etc/init.d/networking restart
    

    Now, the localserver will work fine.

提交回复
热议问题