1

improve admin site

This commit is contained in:
Motiejus Jakštys 2024-01-12 00:30:58 +02:00
parent a99ac0d9db
commit 95e5e92c41

View File

@ -2,4 +2,12 @@ from django.contrib import admin
from .models import Signup 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