linux安装启动django

1 安装&创建项目

pip3 install django
django-admin startproject MySite
[root@webmaster dj_test]# ls
MySite
[root@webmaster dj_test]# cd MySite/
[root@webmaster MySite]# ls
manage.py  MySite
[root@webmaster MySite]# cd MySite/
[root@webmaster MySite]# ls
__init__.py  settings.py  urls.py  wsgi.py

  

2 启动项目

[root@VM_0_3_centos mysite]# python3 manage.py runserver 0.0.0.0:8000 &
[root@VM_0_3_centos mysite]# Performing system checks...

July 07, 2018 - 06:55:21
Django version 2.0.7, using settings 'mysite.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.

  

猜你喜欢

转载自www.cnblogs.com/jabbok/p/9277339.html