from django.utils.html import format_html
@admin.register(YourModel)
class YourModelAdmin(admin.ModelAdmin):
model = YourModel
list_display = [
"display_with_newline",
]
def display_with_newline(self, obj):
return format_html("<br>".join([
str(
fixed_apply.fixed_match.get_label()
) for fixed_apply in obj.fixedmatchapply_set.all()
]))
display_with_newline.short_description = "개행된 필드명"