Skip to content

DATABASES in gettingstarted/settings has duplicate configs #2

@whusnoopy

Description

@whusnoopy

We config DATABASES from line 59 as

# Database
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}

and there is a duplicate config start from line 89

# Parse database configuration from $DATABASE_URL
DATABASES['default'] =  dj_database_url.config()

So when we follow the guide to running locally, the syncdb command will suck and get error output end with

$ python manage.py syncdb
...
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.

that because of the DATABASES is set as dummy

$ python manage.py diffsettings
...
DATABASES = {'default': {'AUTOCOMMIT': True, 'ENGINE': 'django.db.backends.dummy', 'ATOMIC_REQUESTS': False, 'NAME': '', 'TEST_MIRROR': None, 'CONN_MAX_AGE': 0, 'TEST_NAME': None, 'TIME_ZONE': 'UTC', 'TEST_COLLATION': None, 'PORT': '', 'HOST': '', 'USER': '', 'TEST_CHARSET': None, 'PASSWORD': '', 'OPTIONS': {}}}
...

maybe the README should tell newbies to setup their postgres and export DATABASE_URL first, or use sqlite only when running locally

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions