标签:djongo
1.创建web应用
localhost:django rolin$ django-admin.py startproject mysite
这个命令就可以创建一个web应用
2.目录结构
localhost:django rolin$ tree
.
|____mysite
| |____manage.py
| |____mysite
| | |______init__.py
| | |____settings.py
| | |____urls.py
| | |____wsgi.py
mysite目录就是web跟目录
3.运行web服务器
localhost:mysite rolin$ 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.
April 06, 2015 - 14:50:57
Django version 1.7.1, using settings ‘mysite.settings‘
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[06/Apr/2015 14:51:08] "GET / HTTP/1.1" 200 1759
[06/Apr/2015 14:51:08] "GET /favicon.ico HTTP/1.1" 404 1927
指定端口启动
localhost:mysite rolin$ python manage.py runserver 8080
页面:
标签:djongo
原文地址:http://blog.csdn.net/u010670689/article/details/44907415