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

前端 未结 9 583
半阙折子戏
半阙折子戏 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:24

    python manage.py runserver 0.0.0.0:8181
    

    This will run development server that should listen on all IP's on port 8181.

    Note that as of Jun 17, 2011 Django development server is threaded by default (ticket #1609).

    From docs:

    Note that the default IP address, 127.0.0.1, is not accessible from other machines on your network. To make your development server viewable to other machines on the network, use its own IP address (e.g. 192.168.2.1) or 0.0.0.0.

提交回复
热议问题