Commits

Rafael A committed 7e3a9a1

"ugettext_lazy" instead of "gettext"

  • Participants
  • Parent commits 75f9161

Comments (0)

Files changed (2)

File poll/admin.py

 from django.contrib import admin
 from poll.models import Poll, Item, Queue, Vote, Choice
-from django.utils.translation import gettext as _
+from django.utils.translation import ugettext_lazy as _
 
 
 class PollItemInline(admin.TabularInline):

File poll/models.py

 from django.db import models
-from django.utils.translation import gettext as _
+from django.utils.translation import ugettext_lazy as _
 from django.contrib.auth.models import User
 from django.db.models.manager import Manager
 from django.core.exceptions import ValidationError
         else:
             auth = _('Without auth')
 
-        return '%s (%s)' % (self.title, auth)
+        return u'%s (%s)' % (self.title, auth)
 
     class Meta:
         ordering = ['-title']
                                      help_text=_('Its for positioning only'))
 
     def __unicode__(self):
-        return '%s (%d)' % (self.value, self.index)
+        return u'%s (%d)' % (self.value, self.index)
 
     class Meta:
         ordering = ['index']