diff -r 8540e240a50c -r 52e84b58309f django/conf/__init__.py
|
a
|
b
|
a list of all possible variables.
|
| 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" |
| … |
… |
settings = LazySettings()
|
| 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__['_'] = gettext |
| | 149 | setattr(__builtin__, '_', gettext) |
| 149 | 150 | return gettext(*args) |
| 150 | 151 | |
| 151 | | __builtins__['_'] = first_time_gettext |
| | 152 | setattr(__builtin__, '_', first_time_gettext) |
diff -r 8540e240a50c -r 52e84b58309f django/utils/translation/trans_real.py
|
a
|
b
|
def install():
|
| 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): |