On 1/21/20 4:08 PM, Frank van den Heuvel wrote:
Hello,
While following https://docs.mailman3.org/en/latest/migration.html, I want to execute:
python manage.py hyperkitty_import -l foo-list@example.com $var_prefix/archives/private/foo-list.mbox/foo-list.mbox
Of course edited with values for my list. But I already get stuck in not being able to locate "manage.py".
When I run "locate manage.py", I get:
/opt/mailman/mm/venv/lib/python3.7/site-packages/django/conf/project_template/manage.py-tpl
/opt/mailman/mm/venv/lib/python3.7/site-packages/example_project/manage.py /opt/mailman/mm/venv/lib/python3.7/site-packages/falcon/bench/dj/manage.py
Which one is the right one?
Probably none of those. I'm not that familiar with the file layout in the Debian package if that's what you installed, but I would expect to find it in /opt/mailman/mm/venv/bin/ and I'd expect to find the files django_admin and django_admin.py. Both of those will run the Django management interface, but they won't work because they won't access your settings.
I put the following executable in /opt/mailman/mm/bin
#!/bin/bash . /opt/mailman/mm/venv/bin/activate cd /opt/mailman/mm export PYTHONPATH=/opt/mailman/mm export DJANGO_SETTINGS_MODULE=settings django-admin $@
This assumes my settings.py file is /opt/mailman/mm/settings.py. If yours is elsewhere you may need to adjust PYTHONPATH and/or DJANGO_SETTINGS_MODULE. For example, on another server with the settings at /opt/mailman/mm/mailman_web/production.py I have
export DJANGO_SETTINGS_MODULE=mailman_web.production
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan