开发者

"No module named appengine.base" error after deploying Django app on Google App Engine

I'm attempting to deploy a Django application to Google App Engine. The app deploys successfully, but throws the following error when I try to access it in a web browser:

<class 'django.core.exceptions.ImproperlyConfigured'>: 'appengine' isn't an available database backend. Available options are: 'dummy', 'mysql', 'oracle', 'postgresql', 'postgresql_psycopg2', 'sqlite3'
Error was: No module named appengine.base
Traceback (most recent call last):
  File "/base/data/home/apps/[app_id]/test.350631415612260549/main.py", line 29, in <module>
    InstallAppengineHelperForDjango()
  File "/base/data/home/apps/[app_id]/test.350631415612260549/appengine_django/__init__.py", line 545, in InstallAppengineHelperForDjango
    InstallDjangoModuleReplacements()
  File "/base/data开发者_StackOverflow/home/apps/[app_id]/test.350631415612260549/appengine_django/__init__.py", line 262, in InstallDjangoModuleReplacements
    import django.db
  File "/base/data/home/apps/[app_id]/test.350631415612260549/django/db/__init__.py", line 41, in <module>
    backend = load_backend(settings.DATABASE_ENGINE)
  File "/base/data/home/apps/[app_id]/test.350631415612260549/django/db/__init__.py", line 37, in load_backend
    raise ImproperlyConfigured(error_msg)

Additional information: I'm not the original developer of the app, nor am I very familiar with Google App Engine.

My workflow is as follows: pull the code from a Git repository, configure it as a new app in the GoogleAppEngineLauncher GUI (for Mac OS X), then deploy. Am I missing any steps, such as configuring backend settings locally before deploying?


Because you have appengine_django in your project root you are using App Engine Helper. You might have some import path problems so you can try upgrading to the latest version of the helper. However, it is a deprecated project and you are better off porting to django-nonrel if possible. Part of the migration will be changing your database engine in settings.py from 'appengine' (causing your error) to 'dbindexer'

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜