Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion django Internation doesn't work by using Django 1.0 with Zipimport
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
trackmap  
View profile  
 More options Oct 20 2008, 10:45 am
From: trackmap <skatetrack...@gmail.com>
Date: Mon, 20 Oct 2008 07:45:42 -0700 (PDT)
Local: Mon, Oct 20 2008 10:45 am
Subject: Re: django Internation doesn't work by using Django 1.0 with Zipimport
First, you'll have to provide django's locale tree along with your
application files and add an entry in settings.LOCALE_PATHS for it. In
your settings.py:

import os
appdir = os.path.abspath(os.path.dirname(__file__))
LOCALE_PATHS = (
    os.path.join(appdir, 'i18n', 'locale'),
)

The above assumes an i18n directory at the same level as your
settings.py file, containing a locale directory with django's
internationalization files.

Next, if you also want support for
django.middleware.locale.LocaleMiddleware, you need to execute the
following lines in your main.py file, just after calling
InstallAppengineHelperForDjango():

from django.conf import settings
sys.modules[settings.__module__].__file__ = os.path.join(
  os.path.dirname(settings.LOCALE_PATHS[0]), '__init__.py'
)

I added this just before calling main()

On Oct 20, 12:59 pm, qubic <qubic...@gmail.com> wrote:

> http://code.google.com/appengine/articles/django10_zipimport.html
> I follow the steps to make django.zip work in GAE,but i found django
> international doesn't work


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google