2
0
Fork 0

display feedback in admin backend

This commit is contained in:
Andreas (@xAndy) Zimmermann 2023-05-26 02:03:59 +02:00
parent bdf90c2ba8
commit ab9fbb48da
1 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,13 @@
from django.contrib import admin
# Register your models here.
from .models import Feedback
@admin.register(Feedback)
class FeedbackAdmin(admin.ModelAdmin):
list_display = ("helper", "party", "next_year", "feedback_len")
readonly_fields = ("feedback_len",)
list_filter = ("party", "next_year")
def feedback_len(self, obj):
return len(obj.feedback_text)