Django runserver error when specifying port

后端 未结 4 489
粉色の甜心
粉色の甜心 2021-02-04 05:06

I have recently become accustomed to doing the following in my django projects so that I can test bowser compatibility on various OS (i.e. non-linux):

$ sudo ./m         


        
4条回答
  •  北恋
    北恋 (楼主)
    2021-02-04 05:32

    Building upon @Paulo_Scardine's anwser:

    If you want to keep your virtualenv environment variables, you can add the -E option to the sudo command:

    sudo -E $(which python) manage.py runserver 0.0.0.0:80
    

提交回复
热议问题