Jump to content
Chapter 10 Django Error Page 369
2 replies to this topic
Posted 16 December 2013 - 10:28 PM
Here's the log:
Python command: /usr/bin/python2.7
WARNING 2013-12-17 06:19:48,268 application_configuration.py:99] The "python" runtime specified in "/Users/bobbyb/Programming/mygaetest/app.yaml" is not supported - the "python27" runtime will be used instead. A description of the differences between the two can be found here:
INFO 2013-12-17 06:19:48,268 devappserver2.py:660] Skipping SDK update check.
WARNING 2013-12-17 06:19:48,273 api_server.py:331] Could not initialize images API; you are likely missing the Python "PIL" module.
INFO 2013-12-17 06:19:48,279 api_server.py:138] Starting API server at: http://localhost:60265
INFO 2013-12-17 06:19:48,283 dispatcher.py:171] Starting module "default" running at: http://localhost:8080
INFO 2013-12-17 06:19:48,291 admin_server.py:117] Starting admin server at: http://localhost:8000
ERROR 2013-12-17 06:19:50,348 cgi.py:121] Traceback (most recent call last):
File "/Users/bobbyb/Programming/mygaetest/hfwwg.py", line 2, in <module>
from google.appengine.ext.db import djangoforms
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/djangoforms.py", line 97, in <module>
ImportError: No module named django.core.exceptions
Posted 18 December 2013 - 07:16 AM
With the Python 2.7 version of App Engine, Google very kindly dropped support for this Django feature. :-(
To use it, you must use Python 2.5 as described in the book. Sorry for the inconvenience, but we never thought Google would do this, but they did.
Posted 23 August 2014 - 02:14 PM
From the following in Google App Engine Python Third Party Libraries (Django), it appears that Django is available with Python 2.7, but needs to be explicitly included in the "app.yaml" by indicating it as a library:
libraries: - name: django version: "1.2"
This gets past the first hurdle, of not having anything available from the django module. However, it still requires an environment variable set to load the Django settings, so "app.yaml" needed this as well:
env_variables: DJANGO_SETTINGS_MODULE: 'settings'
Finally, since most appear to be played with by the Google framework, I placed some benign values into the file named "settings.py":
LANGUAGE_CODE = 'en-us' TIME_ZONE = 'America/Los_Angeles' USE_I18N = True USE_L10N = True USE_TZ = True
At this point I have the Webpage displaying with the Form, hopefully the remainder works as well.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users