Django安装部署步骤
Django安装
1,需要的依赖包的安装
1、Mysqldb(2.x) pymysql(3.x)
2、pil 或者 pillow
2,dianggo的安装
pip install Djiango
带版本的
pip install Django==1.8.2
3.创建django
1.django-admin startproject projectname 创建项目的名字
2.去到项目名称路径下执行python manage.py runserver如下
3.在浏览器中输入如下图,默认8000端口
MacBook-Pro:~ yina$ cd starttest/
MacBook-Pro:starttest yina$ ls
manage.py starttest
MacBook-Pro:starttest yina$ python manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
You have unapplied migrations; your app may not work properly until they are applied.
Run 'python manage.py migrate' to apply them.
February 08, 2017 - 09:47:47
Django version 1.8.2, using settings 'starttest.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[08/Feb/2017 09:49:32]"GET / HTTP/1.1" 200 1767
[08/Feb/2017 09:49:32]"GET /favicon.ico HTTP/1.1" 404 1939
4.检查命令
5、pythonmanage.pyvalidate / check
6、python manage.py makemigrations
7、python manage.py syncdb / makemigrate
- 点赞
- 收藏
- 关注作者
评论(0)