How to enable django 1.2 with GAE
I added the file appengine_config.py with this instruction
webapp_djan开发者_如何学Gogo_version = '1.2'
Here is some old stuff from my modules that I now wonder if I can remove?
import os
os.environ[u'DJANGO_SETTINGS_MODULE'] = u'conf'
from google.appengine.dist import use_library
use_library('django', '1.2')
# Force Django to reload settings
from django.conf import settings
settings._target = None
os.environ['DJANGO_SETTINGS_MODULE'] = 'conf.settings'
from django.utils.translation import gettext_lazy as _
I'm not sure about the translation import. Everything else can go. I'm guessing that were you need the translation import, it should be done after first importing webapp.
精彩评论