Since app engine 1.4.2 was released, I am getting warnings like this in my production logs:
You are using the default Django
version (0.96). The default Django
version will change in an App Engine
release in the near future. Please
call use_library() to explicitly
select a Django version. For more
information see
http://code.google.com/appengine/docs/python/tools/libraries.html#Django
This occurs on every handler where I use a Django template - via the following:
from google.appengine.ext.webapp import template
I'd like to upgrade to 1.2, however the following links don't seem very clear on exactly how to do this (or whether it works at all):
The common thread is to insert this:
from google.appengine.dist import use_library
use_library('django', '1.2')
However, in what file(s) should this be inserted:
- Just in appengine_config.py?
- In every .py file which does
from google.appengine.ext.webapp import template
?
- In every .py file in the project?
- In 1 and (2 or 3) above, and also add
import appengine_config
to those files?
- In 3 or 4, and also add wrappers around built-in functions like appstats, remote api, datastore admin, etc?
- Something else?
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…