0
在django.utils.translations.__init__.py
:django中的函數'real_ugettext'在哪裏?
def ugettext(message):
return real_ugettext(message)
我找不到它。
在django.utils.translations.__init__.py
:django中的函數'real_ugettext'在哪裏?
def ugettext(message):
return real_ugettext(message)
我找不到它。
讀that file靠近一點:
def delayed_loader(*args, **kwargs):
"""
Replace each real_* function with the corresponding function from either
trans_real or trans_null (e.g. real_gettext is replaced with
trans_real.gettext or trans_null.gettext). This function is run once, the
first time any i18n method is called. It replaces all the i18n methods at
once at that time.
"""
#...
Django做了一些令人討厭的全局搜索魔術,以便用同一個包中的trans_real或trans_null中的ugettext替換它。