Opened 4 years ago

Closed 4 years ago

Last modified 4 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


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


  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 follow-up: Changed 4 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

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.

comment:2 in reply to: ↑ 1 Changed 4 years ago by wiml@…

  • 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 as well as other comments in those bugs.

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