On 4/28/23 11:07, Lars Bjørndal wrote:
[Mark]
Your django-admin command is not finding your settings.py file.
Do you mean /etc/mailman3/ where settings.py lives?
Yes.
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.
Then you may need
django-admin migrate --pythonpath /etc/mailman3 --settings settings
What I have is this shell file that I use to invoke django-admin
#!/bin/bash
. /opt/mailman/mm/venv/bin/activate
cd /opt/mailman/mm
export PYTHONPATH=/opt/mailman/mm
export DJANGO_SETTINGS_MODULE=settings
django-admin $@
Of course the paths in the above are specific to my installation and would be different for you.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan