Marco Herrarte
Marco Herrarte

Reputation: 1620

GAE Error django.core.exception

After download the package GAE 1.8.0.dgm to my Mac OS 10.7, i tried an example from google, and when im importing this:

from google.appengine.ext.db import djangoforms

I get this error:

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

I'm trying this in interactive console and in the app himself

I need to install other packages?

Upvotes: 2

Views: 1320

Answers (2)

Niklas Rosencrantz
Niklas Rosencrantz

Reputation: 26655

Adding this your your app.yaml should work:

libraries:
- name: django
  version: latest

Read this how to use third-party libraries and the link from there.

Upvotes: 3

Tim Hoffman
Tim Hoffman

Reputation: 12986

You should read the docs.

https://developers.google.com/appengine/docs/python/tools/libraries27

django is included in the runtime but you need configure its inclusion through app.yaml libraries directive.

In addition if you are not using django proper consider jinja as a template language over django forms.

Upvotes: 3

Related Questions