Django

Code

Ticket #5795 (closed: invalid)

Opened 1 year ago

Last modified 1 year ago

Error with version 6582 (and higher)

Reported by: hans.rauch@gmx.net Assigned to: nobody
Milestone: Component: Uncategorized
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Until svn version 6581, my program is working very well. If I upgrade to svn version 6582 (and higher), I can't start my program anymore:

NameError at /unterricht/lernarchiv/index.html
name '_' is not defined
Request Method: 	GET
Request URL: 	http://dms.bildung.hessen.de/unterricht/lernarchiv/index.html
Exception Type: 	NameError
Exception Value: 	name '_' is not defined
Exception Location: 	/data/django_projects/dms_projekt/dms/perms.py in <module>, line 19
Python Executable: 	/usr/local/bin/python
Python Version: 	2.5.1

Traceback (most recent call last):
File "/usr/local/lib64/python2.5/site-packages/django/core/handlers/base.py" in _real_get_response
  72. callback, callback_args, callback_kwargs = resolver.resolve(request.path)
File "/usr/local/lib64/python2.5/site-packages/django/core/urlresolvers.py" in resolve
  231. for pattern in self.urlconf_module.urlpatterns:
File "/usr/local/lib64/python2.5/site-packages/django/core/urlresolvers.py" in _get_urlconf_module
  251. self._urlconf_module = __import__(self.urlconf_name, {}, {}, [''])
File "/data/django_projects/dms_projekt/dms/urls.py" in
  32. from dms.views_comment import item_comment, item_manage_comments
File "/data/django_projects/dms_projekt/dms/views_comment.py" in
  29. from dms.roles import require_permission
File "/data/django_projects/dms_projekt/dms/roles.py" in
  28. from dms.perms import *
File "/data/django_projects/dms_projekt/dms/perms.py" in
  19. 'description': _('Lesen: kann Inhalte einsehen/lesen') }

  NameError at /unterricht/lernarchiv/index.html
  name '_' is not defined

May be there is a problem with translating?

Attachments

perms.py (2.3 kB) - added by hans.rauch@gmx.net on 10/22/07 13:54:11.
perms.py

Change History

10/22/07 13:54:11 changed by hans.rauch@gmx.net

  • attachment perms.py added.

perms.py

10/22/07 14:04:26 changed by ramiro

  • status changed from new to closed.
  • needs_better_patch changed.
  • resolution set to invalid.
  • needs_tests changed.
  • needs_docs changed.

Yes, the change log entry for that commit reads:

Fixed #2920 -- Removed _() from builtins.

This is backwards incompatible, but easy to work around. 

And there is a section (http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#_nolongerinbuiltins) dedicated to this on the Backwards Incompatible Changes wiki page (the one it's highly recommended you follow closely if you are using Django from SVN.)

Short version: Insert from django.utils.translation import ugettext as _ at the top of that file.


Add/Change #5795 (Error with version 6582 (and higher))




Change Properties
Action