From 95e5e92c4166cd787c6356d762fef5cfd1e9b67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Fri, 12 Jan 2024 00:30:58 +0200 Subject: [PATCH] improve admin site --- app/signup/admin.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/signup/admin.py b/app/signup/admin.py index 0774788..47fbfec 100644 --- a/app/signup/admin.py +++ b/app/signup/admin.py @@ -2,4 +2,12 @@ from django.contrib import admin from .models import Signup -admin.site.register(Signup) +@admin.register(Signup) +class SignupAdmin(admin.ModelAdmin): + _all_fields = ["email", "created_at", "anonymized_ip", "user_agent"] + + date_hierarchy = "created_at" + list_display = ["email", "created_at", "anonymized_ip", "user_agent"] + list_filter = ["email", "user_agent"] + ordering = ["created_at"] + readonly_fields = _all_fields