based on djanog 1.4.5