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?
With kind regards and thanks for your work!
Frank van den Heuvel
BTW: This is a debian 10.2 with Mailman3:
Django Version: 2.2.9 Python Executable: /opt/mailman/mm/venv/bin/python Python Version: 3.7.3 Python Path: ['/opt/mailman/mm', '/opt/mailman/mm/', '/opt/mailman/mm/bin', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/opt/mailman/mm/venv/lib/python3.7/site-packages'] Server time: Tue, 21 Jan 2020 08:34:45 -0800 Installed Applications: ('hyperkitty', 'postorius', 'django_mailman3', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'django_gravatar', 'compressor', 'haystack', 'django_extensions', 'django_q', 'allauth', 'allauth.account', 'allauth.socialaccount', 'allauth.socialaccount.providers.github', 'allauth.socialaccount.providers.gitlab', 'allauth.socialaccount.providers.google') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django_mailman3.middleware.TimezoneMiddleware', 'postorius.middleware.PostoriusMiddleware')
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
participants (2)
-
Frank van den Heuvel
-
Mark Sapiro