Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python GAE错误django.core.exception_Python_Django_Google App Engine - Fatal编程技术网

Python GAE错误django.core.exception

Python GAE错误django.core.exception,python,django,google-app-engine,Python,Django,Google App Engine,在将GAE 1.8.0.dgm软件包下载到我的Mac OS 10.7之后,我尝试了谷歌的一个例子,当我导入这个软件包时: from google.appengine.ext.db import djangoforms 我得到这个错误: Traceback (most recent call last): File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundl

在将GAE 1.8.0.dgm软件包下载到我的Mac OS 10.7之后,我尝试了谷歌的一个例子,当我导入这个软件包时:

from google.appengine.ext.db import djangoforms
我得到这个错误:

Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 156, in handle_interactive_request
exec(compiled_code, self._command_globals)
File "<string>", line 8, in <module>
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/djangoforms.py", line 97, in <module>
import django.core.exceptions
ImportError: No module named django.core.exceptions
回溯(最近一次呼叫最后一次):
文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine default.bundle/Contents/Resources/google\u appengine/google/appengine/tools/devappserver2/python/request\u handler.py”,第156行,在handle\u interactive\u request中
exec(编译代码、self.\u命令\u全局)
文件“”,第8行,在
文件“/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine default.bundle/Contents/Resources/google\u appengine/google/appengine/ext/db/djangoforms.py”,第97行
导入django.core.exceptions
ImportError:没有名为django.core.exceptions的模块
我正在互动控制台和应用程序中尝试这一点


我需要安装其他软件包吗?

您应该阅读文档

django包含在运行时中,但您需要通过app.yaml libraries指令配置其包含


此外,如果您不使用Django,请将JIJA视为Django窗体上的模板语言。

< P>添加您的App.YAML应工作:

libraries:
- name: django
  version: latest

阅读如何使用第三方库及其链接。

是否安装了django?通过从pythonshell执行
importdjango
,验证python是否在路径中:我需要预先安装django?安装GAE后?谷歌的哪个例子?