Python版本:2.7.10 Django的版本:1.8 環境:虛擬環境應用程序的註冊表錯誤的Django 1.8
問題:每當我試圖運行./manage.py的runserver或殼我得到這個錯誤
"The translation infrastructure cannot be initialized before the "
django.core.exceptions.AppRegistryNotReady: The translation infrastructure
cannot be initialized before the apps registry is ready. Check that you
don't make non-lazy gettext calls at import time."
基於對某些相關帖子的一些回覆,我也檢查了我的wsgi文件,它具有引用wsgi應用程序的更新方式。這是我的WSGI文件的外觀:在解決這一
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "instant_reports.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
任何幫助/指導?
所以,它告訴你,你有'gettext的電話'在進口時正在執行。你可以展示他們嗎? –
我實際上在多個地方調用了這個函數 - 是否有需要查看的特定文件? –