Cannot load DATABASE_NAME from settings file in version 0.6

Issue #210 resolved
Anonymous created an issue

I am trying to run Satchmo as a standalone app. I created from and from I also edited to define DATABASE_ENGINE and to define DATABASE_NAME, _USER and _PASSWORD.

However, when I run python I get the following error: You must specified a value for DATABASE_NAME in

I managed to work around this error editing and changing DJANGO_SETTINGS_MODULE to 'settings' instead of 'satchmo.settings'. I queried the database and verified that had correctly loaded the sample data.

When i try to launch the app with python runserver, I try to load localhost:8000 in the browser and i get a missing DATABASE_NAME error again. I changed DJANGO_SETTINGS_MODULE back to 'satchmo.settings' in and relauched the app, but it still fails with the same error.

I have checked that the line from local_settings import * is not commented in I can also open an interactive shell, type import settings and read settings.DATABASE_NAME correctly.

Can anybody help me? The error when i try to open localhost:8000 is:

Traceback (most recent call last):

File "D:\Python25\lib\site-packages\django\core\servers\", line 278, in run self.result = application(self.environ, self.start_response)

File "D:\Python25\lib\site-packages\django\core\servers\", line 620, in call return self.application(environ, start_response)

File "D:\Python25\lib\site-packages\django\core\handlers\", line 205, in call response = self.get_response(request)

File "D:\Python25\lib\site-packages\django\core\handlers\", line 63, in get_response response = middleware_method(request)

File "D:\Python25\lib\site-packages\django\middleware\", line 16, in process_request language = translation.get_language_from_request(request)

File "D:\Python25\lib\site-packages\django\utils\", line 97, in get_language_from_request return real_get_language_from_request(request)

File "D:\Python25\lib\site-packages\django\utils\translation\", line 347, in get_language_from_request lang_code = request.session.get('django_language', None)

File "D:\Python25\lib\site-packages\django\contrib\sessions\backends\", line 48, in get return self._session.get(key, default)

File "D:\Python25\lib\site-packages\django\contrib\sessions\backends\", line 118, in _get_session self._session_cache = self.load()

File "D:\Python25\lib\site-packages\django\contrib\sessions\backends\", line 18, in load

File "D:\Python25\lib\site-packages\django\db\models\", line 69, in get return self.get_query_set().get(args, *kwargs)

File "D:\Python25\lib\site-packages\django\db\models\", line 261, in get obj_list = list(clone)

File "D:\Python25\lib\site-packages\django\db\models\", line 114, in iter return iter(self._get_data())

File "D:\Python25\lib\site-packages\django\db\models\", line 482, in _get_data self._result_cache = list(self.iterator())

File "D:\Python25\lib\site-packages\django\db\models\", line 188, in iterator cursor = connection.cursor()

File "D:\Python25\lib\site-packages\django\db\", line 33, in cursor cursor = self._cursor(settings)

File "D:\Python25\lib\site-packages\django\db\backends\postgresql_psycopg2\", line 57, in _cursor raise ImproperlyConfigured("You need to specify DATABASE_NAME in your Django settings file.")

ImproperlyConfigured: You need to specify DATABASE_NAME in your Django settings file.

Reported by nofactor

Comments (1)

  1. Log in to comment