Django runserver error when specifying port

后端 未结 4 490
粉色の甜心
粉色の甜心 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:18

    Here's another solution, instead of creating shell script, just specify which python executable you want to use in the command:

    Assuming that your virtualenv container is called .virtualenvs and there's an env called myproject in it, this is command you have to write:

    $ sudo ~/.virtualenvs/myproject/bin/python manage.py runserver 0.0.0.0:80
    

提交回复
热议问题