Skip to content

Instantly share code, notes, and snippets.

@airstrike
Created May 21, 2012 20:50
Show Gist options
  • Save airstrike/2764594 to your computer and use it in GitHub Desktop.
Save airstrike/2764594 to your computer and use it in GitHub Desktop.
no gettext translation for contrib.auth models
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.conf import settings
>>> settings.LANGUAGE_CODE
'pt_BR'
>>> from django.contrib.auth.models import User
>>> from django.utils.translation import ugettext as _
>>> User._meta.verbose_name
<django.utils.functional.__proxy__ object at 0x01686730>
>>> print u'%s' % User._meta.verbose_name
user
>>> print _(User._meta.verbose_name)
user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment