fixed manage.py for full db access with new "sh" command, and added debugging to get_caller