1. Install pip
sudo apt-get install python-pip
2. Install Django and create the project
pip install Django==1.9.2
django-admin.py startproject mysitecd mysite
3 , install python2.7-dev
sudo apt-get install python2.7-dev
4. Install uwsig
sudo python2.7 -m pip install uwsgi
5. Then go to the directory to find the created project
Create test.py
# test.py
def application(env, start_response):
start_response('200 OK', [('Content-Type','text/html')])
return [b" Hello World"] # python3
#return ["Hello World"] # python2
6. Then enter the project directory and enter
uwsgi --http :8000 --wsgi-file test.py
7. Open the browser Tool, enter the URL
127.0.0.1:8000
8. Install mongodb
pip install pym>
9. Others
xlrd==0.9.4
10. Start the project
python manage.py runserver 127.0.0.1:8000
uwsgi --http :8000 --module mysite.wsgi
The above introduces ubuntu+Django+Nginx+uWSGI, including the content of django and ubuntu. I hope it will be helpful to friends who are interested in PHP tutorials.