django - datastore error after migrating to python2.7 - works fine on localhost -


i understand google.appengine.dist removed python2.7. should use instead?

application works fine on localhost, deployment seems successful, getting message online:

error: server error

the server encountered error , not complete request. if problem persists, please report problem , mention error message , query caused it.

here log says:

traceback (most recent call last):   file  "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 196, in handle handler = _config_handle.add_wsgi_middleware(self._loadhandler())   file "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 255, in _loadhandler handler = __import__(path[0])   file "/base/data/home/apps/s~quick-test/1.368856085074570769/django_bootstrap.py", line 54, in <module> google.appengine.dist import use_library importerror: no module named dist 

here's line 54 django_bootstrap.py:

from google.appengine.dist import use_library use_library('django', '1.2') 

gae launcher version 1.8.2, had problem 1.8 too.

python 2.7 configuration requires third-party libraries specified in app.yaml, might sufficient have in app.yaml file:

libraries: - name: django   version: "1.2" 

you can use webapp2 includes django’s templating engine. version 1.2 included sdk part of app engine, , not need bundle django use it.

import os google.appengine.ext.webapp import template 

also, code don't need call use_library() explicitly select django version:

webapp_django_version = "1.2" 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -