Custom Search

Wednesday, November 30, 2016

python django 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.

Error:
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.

Fix:
Make following change in your app's app.wsgi file

Delete/Comment out Following lines from wsgi file
#import django.core.handlers.wsgi
#application = django.core.handlers.wsgi.WSGIHandler()

Then add Following lines to wsgi file
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()




1 comment: