Skip to content
Home » django.core.exceptions.improperlyconfigured: requested setting use_i18n, but settings are not configured

django.core.exceptions.improperlyconfigured: requested setting use_i18n, but settings are not configured

To solve the django.core.exceptions.improperlyconfigured: requested setting use_i18n, but settings are not configured. you must either define the environment variable django_settings_module or call settings.configure() before accessing settings. Follow the below method.

It generally occurs while trying to connect to MySQL server or to heroku. To solve this export the required environment variable.

export DJANGO_SETTINGS_MODULE=mysite.settings

If the export doesn’t work then try the below referred link.

You can Also refer django.core.exceptions.ImproperlyConfigured: Requested setting ROOT_URLCONF, but settings are not configured. for more details.

Tags: