2
0
Fork 0

Make all feedback fields read-only in admin

This commit is contained in:
Luca 2023-05-26 22:01:16 +02:00
parent fa2b1f4ce0
commit 3d3686cec2
2 changed files with 4 additions and 1 deletions

View File

@ -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",)

View File

@ -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}"