Symon
Symon

Reputation: 671

How i can exclude Django database in Django 1.9

I'm wondering how to exclude the database from my django app, that doesn't really need one, i've deleted the DATABASES tuple (or simply made it an empty tuple), but he gives me this erros:

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

How i can figure out?

Thanks.

Upvotes: 1

Views: 111

Answers (2)

Symon
Symon

Reputation: 671

Solved with this approach:

DATABASES = {}

And disabled Authentication middleware, as you can see in over there:

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',    
'django.middleware.csrf.CsrfViewMiddleware',
#'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',

)

Upvotes: 0

takacsmark
takacsmark

Reputation: 4431

This is the minimum you have to apply in your settings, if you don't want a database:

DATABASES = {
    'default': {
        'ENGINE': '',
    }
}

EDIT

if you still get the error try this:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.dummy',
    }
}

Upvotes: 4

Related Questions