learning-unlimited/ESP-Website — Issue #241: Correctly reference Django settings
Author: jmoldow
Created: 2012-01-13 20:15:05+00:00
State: open

I was reading the Django documentation recently, and I noticed this:

On , it says "note that your code should not import from [...] your own settings file." It says to use "from django.conf import settings" to import settings, and to access setting SETTING, to reference it with settings.SETTING.

There are a number of places where we use "from esp.settings import SETTING", which violates both of those rules. There are also some instances of "import esp.settings" and "hasattr('esp.settings',foo)."

We should change these pieces of code to match what the Django documentation says to do.