From 1ab59865b5d1ed6847777f7606718ff01fbeb2c8 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Sat, 6 Jul 2024 12:55:51 +0530 Subject: [PATCH] Improve scaling admin flow to delete all entries for user --- src/khoj/app/settings.py | 2 +- src/khoj/database/admin.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/khoj/app/settings.py b/src/khoj/app/settings.py index 2cb4440b..93f449ab 100644 --- a/src/khoj/app/settings.py +++ b/src/khoj/app/settings.py @@ -112,7 +112,7 @@ ASGI_APPLICATION = "app.asgi.application" # Database # https://docs.djangoproject.com/en/4.2/ref/settings/#databases - +DATA_UPLOAD_MAX_NUMBER_FIELDS = 20000 DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", diff --git a/src/khoj/database/admin.py b/src/khoj/database/admin.py index 95e3508c..d3e630c3 100644 --- a/src/khoj/database/admin.py +++ b/src/khoj/database/admin.py @@ -125,7 +125,10 @@ class EntryAdmin(admin.ModelAdmin): "file_path", ) search_fields = ("id", "user__email", "user__username", "file_path") - list_filter = ("file_type",) + list_filter = ( + "file_type", + "user__email", + ) ordering = ("-created_at",)