add django support and fix sh bugs