make plots.py independent of Django settings as well; fix logging during loading of the settings module