Make all feedback fields read-only in admin

pull/1/head
Luca 2 years ago
parent fa2b1f4ce0
commit 3d3686cec2

@ -6,7 +6,7 @@ from .models import Feedback
@admin.register(Feedback)
class FeedbackAdmin(admin.ModelAdmin):
list_display = ("helper", "party", "next_year", "feedback_len")
readonly_fields = ("feedback_len",)
readonly_fields = ("helper", "party", "next_year", "feedback_text", "feedback_len")
list_filter = ("party", "next_year")
ordering = ("helper__name",)

@ -16,3 +16,6 @@ class Feedback(models.Model):
)
next_year = models.BooleanField()
feedback_text = models.TextField(blank=True, default="")
def __str__(self):
return f"Feedback by {self.helper.name}"

Loading…
Cancel
Save