more django stuff and update_db refactoring