Django项目简单构建

1、确保Django已安装成功,若有问题。参考:http://www.cnblogs.com/s1099312273/p/3289057.html

2、进入终端中,新建一个django项目

django-admin.py startproject mysite

3、进入mysite目录

4、启动Django自带的web服务器

python manage.py runserver

5、浏览器中打开地址http://127.0.0.1:8000/

It worked!

Congratulations on your first Django-powered page.

Of course, you haven't actually done any work yet. Here's what to do next:

  • If you plan to use a database, edit the DATABASES setting in mysite/settings.py.
  • Start your first app by running python mysite/manage.py startapp [appname].

You're seeing this message because you have DEBUG = True in your Django settings file and you haven't configured any URLs. Get to work!

原文地址:https://www.cnblogs.com/s1099312273/p/3289574.html