#pip 安装
F:\python_environment>pip install Django==1.11
#到目录下源码安装
python setup.py install
#检查Django安装成功
F:\python_environment>python -m django --version
1.11
# 或者
import django
#创建项目
F:\python_www>django-admin
F:\python_www>django-admin startproject web
#启动服务
F:\python_www\web>python manage.py
F:\python_www\web>python manage.py runserver
Performing system checks...
#通过浏览器访问http://127.0.0.1:1111/
F:\python_www\web>python manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
You have 13 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
June 19, 2017 - 22:49:06
Django version 1.11, using settings 'myblog.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
Error: [WinError 10013] 以一种访问权限不允许的方式做了一个访问套接字的尝试。
#更改端口再次 访问就好了
F:\python_www\web>python manage.py runserver 1111
Performing system checks...
Django 的安装及访问
最新推荐文章于 2024-05-24 09:00:46 发布