0

I have a Django 1.4.3 project using Python 2.7.3 on Ubuntu 12.10. In my entire project, there is only one settings.py file, and in manage.py, I have this line

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "hellodjango.settings")

Of course, the name of my project is hellodjango, and the settings.py file is in the subfolder hellodjango (they have the same name).

When I type the following line into the console:

python manage.py diffsettings

These are my results for DATABASES:

DATABASES = {'default': {}, 'mioa': {'1': 'this thingy', '2': 'that thingy'}}

The relevant lines in settings.py are these:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': 'mydatabase'
    },
    'mioa': {
        '1': 'this thingy',
        '2': 'that thingy'
    }
}

I have the 'mioa' entry in there to demonstrate my problem. For some reason, the 'default' field is not getting set. Does anyone know why this is happening? Or what the solution is?

  • Something is overwriting your db settings... search your settings.py for something that might be doing this. Perhaps say if you're on heroku and using a ENVVAR based DB configuration app. – Yuji 'Tomita' Tomita Feb 11 '13 at 09:09

1 Answers1

0

Help on diffsettings says:

Displays differences between the current settings.py and Django's
default settings

which means, that it show only difference between your value and default one. Seems like your value is completely the same as the default one, so you don't see any difference.

Try another engine and/or database name and you'll see it's changed.

Thorin Schiffer
  • 2,818
  • 4
  • 25
  • 34