How to make Django's devserver public ? Is it generally possible?

前端 未结 9 595
半阙折子戏
半阙折子戏 2020-12-08 10:03

I\'m currently trying out the Django framework and I would share/present/show some stuff I\'ve made to my workmate/friends. I work in Ubuntu under Win7 via VMware. So my wis

9条回答
  •  悲&欢浪女
    2020-12-08 10:21

    I had to add this line to settings.py in order to make it work (otherwise it shows an error when accessed from another computer)

    ALLOWED_HOSTS = ['*']
    

    then ran the server with:

    python manage.py runserver 0.0.0.0:9595
    

提交回复
热议问题