配置Django App

1、Create Project:
    django-admin.py startproject mysite
2.Start Django Server:
    python manage.py runserver 0.0.0.0:8000
3.Translate Model.py to SQL syntax 
    python manage.py validate
    python manage.py sql polls
4.Create Table from Model.py
    python manage.py syncdb
5.Create App:
  python manage.py startapp polls
6 Configure the Setting.py
    6.1 Add App
    6.2 Configure Database
    6.3 
7 Configure the Url.py 
    url(r'^polls/', include('polls.urls')), # project.url
    from app   import views   #app.url
8 Configure the views.py
  from django.shortcuts import render
from django.shortcuts import render_to_response 
from django.http import HttpResponse
from django import template
 
     

你可能感兴趣的:(django,APP,it,project,setting)