django实例，转载自 http://www.cnblogs.com/cacique/archive/2012/09/29/2707976.html