Fandekasp/django-sqs — pull request #1 by mbrochh (2012-06-22 07:07:28+00:00)
Title: Fixed wrong imports from settings.

The way it is validated if certain settings are set in __init__.py is wrong.

https://docs.djangoproject.com/en/dev/topics/settings/#using-settings-in-python-code

You correctly import from django.conf import settings but this is an object and not a module, so subsequent import like from settings import SETTING_NAME cannot be done.

In the past this has only worked, because with the old django 1.3 project directory structure, the ROOT folder of the project contained an __init__.py and therefore was a Python module. The root folder also contained a settings.py, therefore you were able to import `from settings import XYZ`. Note that this import actually imports the settings.py in the project root and does not touch at all the import `from django.conf import settings` that has been done before.

With the new Django 1.4 project structure, the root no longer has an __init__.py and the settings.py lives inside a `myproject` module. Therefore suddenly it is no longer possible to do `from settings import ...` because there is no settings module anywhere in the python path.