Perhaps this script could read the settings from django.conf.settings?  (I'm not sure if this is correct design for an external script, but it's worth asking.)  The script works, by the way.