After the cloud server solution starts Django inaccessible

Check the cloud server corresponds to port is open.

If you use the pagoda panel, also you need to open the corresponding port in the panel! ! !

 

setting.py modify the following settings:

ALLOWED_HOSTS = ['*']

 

Start using the following code:

manager.py the runserver Python 0.0 . 0.0 : Port

 

 

Guess you like

Origin www.cnblogs.com/Hazelnut-xu/p/12010301.html