﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30577	Custom rendering for readonly fields in admin	David	nobody	"The new view permission is extremely useful, and encourages more use of the Django Admin tool. It has highlighted a limitation in the rendering of `readonly_fields` that can be easily addressed. At the moment, `readonly_fields` (or all fields when the user has only `can_view`) can only have custom rendering or formatting if they are custom properties or new fields (created in the ModelAdmin), existing fields can't be changed. In my use-case I have a number of rich text enhanced `TextField`s, which when rendered as read-only show up as HTML and can't be marked safe. In this case creating a custom field in the `ModelAdmin` where the Field can be output with `mark_safe()` doesn't work as the original field needs to exist for users with change permissions, the only other way is to include the field twice which creates UX issues.

If, in ModelAdmin, you could override the formatting/output of a read-only field it would address this issue. Alternatively, as mentioned in the comments of #14802, the idea of Fields having a method that is called by admin to handle the read-only HTML rendering would also do the trick as is related."	New feature	new	contrib.admin	5.1	Normal			Florian Demmer Carlos Palol ldeluigi Mariusz Felisiak	Accepted	0	0	0	0	0	0
