‘WSGIRequest’ object has no attribute ‘LANGUAGE_CODE’

If you have this error… make sure you have the LocaleMiddleware installed in your MIDDLEWARE_CLASSES.

MIDDLEWARE_CLASSES = (
    # other middleware ...
    'django.middleware.locale.LocaleMiddleware',
)

Leave a Comment