0

This is My Settings.py:

         DATABASES = {
             'default': {},
             'company': {
                 'ENGINE': 'django.db.backends.mysql',
                 'NAME': 'leavebuddy_company',
                 'USER': 'leavebuddy_user2',
                 'PASSWORD': '******',
                 'HOST': '/Applications/MAMP/tmp/mysql/mysql.sock',
                 'PORT': '3306',
}

}

Its Giving me the error:

           settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.

Can you guys please guide me in the right direction.Thanks

Shivratna
  • 190
  • 2
  • 11

1 Answers1

0

You must define a default database. As per the documentation (emphasis mine):

The DATABASES setting must configure a default database; any number of additional databases may also be specified.


Unless you're going to be using multiple databases, you do not need a default and a company database.

Just use:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'leavebuddy_company',
        'USER': 'leavebuddy_user2',
        'PASSWORD': '******',
        'HOST': '/Applications/MAMP/tmp/mysql/mysql.sock',
        'PORT': '3306',
    }
}
Thomas Orozco
  • 53,284
  • 11
  • 113
  • 116
  • I am using multiple databases but i dont want the default database. as per the doc, its possible but in my case its not working. https://docs.djangoproject.com/en/dev/topics/db/multi-db/ – Shivratna May 04 '14 at 14:11
  • @Shivratna You don't really have a choice when using Django... The default database must be defined. Just use one of your multiple databases as default. – Thomas Orozco May 04 '14 at 14:13