我一直在关注此教程,试图在Google应用引擎上构建应用:
https://github.com/GoogleCloudPlatform/appengine-django-skeleton
虽然当我运行dev_appserver.py时,我遇到了一堵砖墙,3台服务器中有2台运行良好。但是开发服务器只返回500个错误。
确切的控制台输出如下:
ubuntu@ubuntu:~/Desktop/appengine-django-skeleton$ dev_appserver.py --port=9999 app.yaml
INFO 2015-12-15 15:50:11,507 sdk_update_checker.py:229] Checking for updates to the SDK.
INFO 2015-12-15 15:50:11,691 sdk_update_checker.py:257] The SDK is up to date.
INFO 2015-12-15 15:50:11,807 api_server.py:205] Starting API server at: http://localhost:60930
INFO 2015-12-15 15:50:11,993 dispatcher.py:197] Starting module "default" running at: http://localhost:9999
INFO 2015-12-15 15:50:11,993 admin_server.py:116] Starting admin server at: http://localhost:8000
ERROR 2015-12-15 15:50:16,395 wsgi.py:263]
Traceback (most recent call last):
File "/home/ubuntu/Desktop/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/home/ubuntu/Desktop/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/home/ubuntu/Desktop/google_appengine/google/appengine/runtime/wsgi.py", line 96, in LoadObject
__import__(cumulative_path)
File "/home/ubuntu/Desktop/appengine-django-skeleton/mysite/wsgi.py", line 29, in <module>
application = get_wsgi_application()
File "/home/ubuntu/Desktop/appengine-django-skeleton/lib/django/core/wsgi.py", line 13, in get_wsgi_application
django.setup()
File "/home/ubuntu/Desktop/appengine-django-skeleton/lib/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/ubuntu/Desktop/appengine-django-skeleton/lib/django/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/ubuntu/Desktop/appengine-django-skeleton/lib/django/django/apps/config.py", line 131, in create
"'%s' isn't a subclass of AppConfig." % entry)
ImproperlyConfigured: 'django.contrib.admin.apps.AdminConfig' isn't a subclass of AppConfig.
我猜这里的关键是
ImproperlyConfigured: 'django.contrib.admin.apps.AdminConfig' isn't a subclass of AppConfig.
没有从github对该文件进行任何代码更改。只有github页面上列出的配置更改。
答案 0 :(得分:1)
我已经通过在virtualenv
目录下安装lib
所需的所有模块来解决此问题。克隆存储库后,运行此命令。
pip install -r requirements.txt