updated django utils
properly implemented the retry and cleaned up the imports