Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#16718 closed Bug (duplicate)

check_for_language fails when django are imported from zip file

Reported by: jsantana@… Owned by: nobody
Component: Translations Version: 1.2
Severity: Normal Keywords: egg zip
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If you import django from a zip file and some i18n utils fail (i.e django.views.i18n.javascript_catalog)

Steps:

  1. import django as zip file
  2. setup a javascript translation different from default with some strings, i.e locale/es/LC_MESSAGES/djangojs.{po,mo}
  3. setup javascript_catalog view
  4. make a request like http://server/i18n/?language=es
  • expected result:

spanish catalog should be returned in javascript file

  • result:

default language catalog is returned in javascript file


Change History (2)

comment:1 by Aymeric Augustin, 13 years ago

Resolution: duplicate
Status: newclosed

Django can't be packaged as a Python egg, in particular because it's hard to retrieve the templates and translation files.

If I understand correctly, by "importing from a zipfile", you mean "running from an egg", so it's a duplicate of #596.

in reply to:  1 comment:2 by wiml@…, 13 years ago

Keywords: egg zip added

Replying to aaugustin:

it's a duplicate of #596.

I think it is actually a duplicate of #8280.

The Django installation docs make reference to installing as an egg, there are various accepted patches for running from a zip file (eg #8238 and the aforementioned #8280), and apparently it is (was?) the preferred (only?) way to run Django on Google App Engine. - see https://developers.google.com/appengine/articles/django10_zipimport as well as other comments in those bugs.

Note: See TracTickets for help on using tickets.
Back to Top