Using Django to make my baby site:(1)开启一个Django项目

前提: 1.python环境要有

          2.Django要有

          3.python虚环境envbabysite

开搞!

第一步:建立工程。

命令: django-admin startproject mybabysite

# 有的需要输入: django-admin.py startproject mybabysite


ls一下看懂啊如下目录结构:
--manage.py
--mybabysite

__init__.py
settings.py
urls.py
wsgi.py

第二步:启动服务

命令:python manager.py runserver 0.0.0.0:8000

浏览器访问地址:http://hongkewang.tk:8000/  ,效果如下:

It worked!

Congratulations on your first Django-powered page.

Of course, you haven't actually done any work yet. Next, start your first app by running python manage.py startapp [app_label].

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!

万丈babysite平地起,第一步完成。

发表留言

人生在世,错别字在所难免,无需纠正。