开发者

Using sqlite3 within Google App Engine?

I am trying to deploy my Python + Django project to the Google App Engine. Right now it works fine on my local computer, but when I try running it as a project within the Google App Engine, I get the following error.

ImproperlyConfigured: 'django.db.backends.sqlite3' isn't an available database backend. 
Try using django.db.backends.XXX, where XXX is one of:
    'dummy', 'mysql', 'oracle', 'postgresql', 'postgresql_psycopg2', 'sqlite3'
Error was: cannot import name utils

Here is the part of my se开发者_运维技巧ttings.py file that specifies the sqlite3 database:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'mydb.db', # Or path to database file if using sqlite3.
        'USER': '',                      # Not used with sqlite3.
        'PASSWORD': '',                  # Not used with sqlite3.
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
    }
}


Google App Engine requires that you use its own datastore, rather than sqlite or another database. There is a project that will allow you to use pretty much regular Django models on App Engine called django-nonrel. You can find more information about setting it up here: http://code.google.com/appengine/articles/django-nonrel.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜