Improve scaling admin flow to delete all entries for user

This commit is contained in:
Debanjum Singh Solanky 2024-07-06 12:55:51 +05:30
parent 6d59ad7fc9
commit 1ab59865b5
2 changed files with 5 additions and 2 deletions

View file

@ -112,7 +112,7 @@ ASGI_APPLICATION = "app.asgi.application"
# Database # Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases # https://docs.djangoproject.com/en/4.2/ref/settings/#databases
DATA_UPLOAD_MAX_NUMBER_FIELDS = 20000
DATABASES = { DATABASES = {
"default": { "default": {
"ENGINE": "django.db.backends.postgresql", "ENGINE": "django.db.backends.postgresql",

View file

@ -125,7 +125,10 @@ class EntryAdmin(admin.ModelAdmin):
"file_path", "file_path",
) )
search_fields = ("id", "user__email", "user__username", "file_path") search_fields = ("id", "user__email", "user__username", "file_path")
list_filter = ("file_type",) list_filter = (
"file_type",
"user__email",
)
ordering = ("-created_at",) ordering = ("-created_at",)