python写第一个网页并连接数据库

1>安装django见别的博客

2>运行开发服务器

  在命令提示符里进入目录mysite:cd: mysite   (注:我的放在E盘根目录下)

  输入运行开发命令:python manage.py runserver

  输出结果:

E:\mysite>python manage.py runserver
Performing system checks...

System check identified no issues (0 silenced).

You have 14 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.
May 20, 2018 - 09:14:13
Django version 2.0.5, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.

  在浏览器打开http://127.0.0.1:8000/,会出现一个欢迎界面。

3>Hello Word

猜你喜欢

转载自www.cnblogs.com/riddle/p/9062544.html