Code

Opened 6 years ago

Closed 6 years ago

#5795 closed (invalid)

Error with version 6582 (and higher)

Reported by: hans.rauch@… Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 (1)

perms.py (2.3 KB) - added by hans.rauch@… 6 years ago.
perms.py

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by hans.rauch@…

perms.py

comment:1 Changed 6 years ago by ramiro

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

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 Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.