A
A
Anton2015-12-09 13:42:06
Django
Anton, 2015-12-09 13:42:06

Django: How to open development server for web access?

Is it possible to open Django's built-in server to be accessed by external IP? How? -- if I may.
Direct indication of such an IP in runserver is prohibited:

Error: That IP address can't be assigned to.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Roman Kitaev, 2015-12-09
@Gambetto

As already mentioned above - ./manage.py runserver 0.0.0.0:8000
Next, if the machine is behind a router, forward the port (NAT) or, if you are not afraid and do not need access to other machines from the outside, make a DMZ.
If there is a firewall (and the router is configured) - look at the firewall rules.

M
marazmiki, 2015-12-09
@marazmiki

Try running ./manage.py runserver 0.0.0.0:8000
An important, but not obvious, nuance is that you need superuser privileges to open a port below 1024.

U
un1t, 2015-12-09
@un1t

Is this IP exactly on your machine?

D
devel787, 2015-12-14
@devel787

You can use https://ngrok.com/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question