28 Apr
2023
28 Apr
'23
6:07 p.m.
[Mark]
On 4/27/23 11:13 PM, Lars Bjørndal wrote:
When running
django-admin migrate
, I get the following:Traceback (most recent call last):
...
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.
How could that be fixed?
Your django-admin command is not finding your settings.py file.
Do you mean /etc/mailman3/ where settings.py lives?
Either run it with a --pythonpath argument naming the directory that contains settings.py or set the environment PYTHONPATH to that directory.
I tried django-admin migrate --pythonpath /etc/mailman3
, and got the same result.
Thanks, Lars