Fixed #8033 -- Explained app registry error during translation setup #2838

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

Member
claudep commented Jun 21, 2014

No description provided.

@timgraham timgraham commented on an outdated diff Jun 21, 2014
django/utils/translation/trans_real.py
@@ -160,7 +161,14 @@ def _init_translation_catalog(self):
def _add_installed_apps_translations(self):
"""Merges translations from each installed app."""
- for app_config in reversed(list(apps.get_app_configs())):
+ try:
+ app_configs = reversed(list(apps.get_app_configs()))
+ except AppRegistryNotReady:
+ raise AppRegistryNotReady(
+ "The translation infrastructure cannot be initialized before the "
+ "apps registry is ready. Check that you don't call non-lazy "
timgraham
timgraham Jun 21, 2014 Owner

"don't make non-lazy calls" (instead of "call non-lazy calls")?

@claudep claudep Fixed #8033 -- Explained app registry error during translation setup
Thanks Tim Graham and Aymeric Augustin for the review.
7ca7ed9
@claudep claudep closed this Jun 23, 2014
@claudep claudep deleted the claudep:8033 branch Jun 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment