Ticket #5317: builtins.diff
File builtins.diff, 1.2 KB (added by , 17 years ago) |
---|
-
django/conf/__init__.py
8 8 9 9 import os 10 10 import time # Needed for Windows 11 import __builtin__ 11 12 from django.conf import global_settings 12 13 13 14 ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE" … … 145 146 # from within this file would cause a circular import. 146 147 def first_time_gettext(*args): 147 148 from django.utils.translation import gettext 148 __builtins__['_'] = gettext149 setattr(__builtin__, '_', gettext) 149 150 return gettext(*args) 150 151 151 __builtins__['_'] = first_time_gettext 152 setattr(__builtin__, '_', first_time_gettext) -
django/utils/translation/trans_real.py
419 419 Installs the gettext function as the default translation function under 420 420 the name '_'. 421 421 """ 422 __builtins__['_'] = gettext 422 import __builtin__ 423 setattr(__builtin__, '_', gettext) 423 424 424 425 dot_re = re.compile(r'\S') 425 426 def blankout(src, char):