1.structure:

django-admin.py startproject  djangoprojectname

django-admin.py startapp djangoappname

inner djangoprojectname:

manage.py  djangoprojectname djangoappname

djangoprojectname:

setting.py  urls.py

2.setting.py:

DATABASES

ROOT_URLCONF = 'website.urls'

WSGI_APPLICATION = 'website.wsgi.application'

INSTALLED_APPS

 

urls.py:

urlpatterns = patterns('',

url('http content','viewfile'),

)

 

webapp:

model.py

urls.py:

define twice implement action

views.py:

define views

templet:

define impact.html

 

posted on 2014-09-23 22:22  yuyezhulan  阅读(116)  评论(0编辑  收藏  举报