django and python code with new implimentation