On Mon, Oct 12, 2026 at 12:13 PM Andreas Vetter < andreas.vetter@uni-wuerzburg.de> wrote:
Am Thursday, 8 October 2026, 15:23:44 Central European Summer Time schrieb Mark Sapiro:
On 10/8/26 5:03 AM, Andreas Vetter wrote:
Cool. And since there are a lot of empty archives: How would I find the empty archives to feed to this? Can MailingList.objects.get() come up with something like a number of archived mails or threads or used space?
Something like
>>> from hyperkitty.models import MailingList >>> for mlist in MailingList.objects.all(): ... if len(mlist.emails.all()) == 0: ... print(mlist.name) ...will print the names of all empty archived lists. either replace
print(mlist.name)withmlist.deleteor addmlist.delete(indented the same amount) afterprint(mlist.name)to delete them.First try, first problem:
from hyperkitty.models import MailingList Traceback (most recent call last): File "<console>", line 1, in <module> File "/opt/mailman/venv/lib64/python3.11/site-packages/hyperkitty/models/ __init__.py", line 25, in <module> from .category import ThreadCategory File "/opt/mailman/venv/lib64/python3.11/site-packages/hyperkitty/models/ category.py", line 64, in <module> class ThreadCategory(models.Model): File "/opt/mailman/venv/lib64/python3.11/site-packages/django/db/models/
(venv) mailman@lists:~> django-admin shell Python 3.11.15 (main, Aug 14 2026, 20:29:30) [GCC] on linux Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) base.py", line 129, in __new__ app_config = apps.get_containing_app_config(module) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib64/python3.11/site-packages/django/apps/ registry.py", line 260, in get_containing_app_config self.check_apps_ready() File "/opt/mailman/venv/lib64/python3.11/site-packages/django/apps/ registry.py", line 137, in check_apps_ready settings.INSTALLED_APPS File "/opt/mailman/venv/lib64/python3.11/site-packages/django/conf/ __init__.py", line 102, in __getattr__ self._setup(name) File "/opt/mailman/venv/lib64/python3.11/site-packages/django/conf/ __init__.py", line 82, in _setup raise ImproperlyConfigured( django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
I don't see INSTALLED_APPS in any of the configuration files. Where should this be defined?
What does your /etc/mailman3/settings.py look like?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]