﻿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
14355	"""readonly"" fields don't display their ""help_text"" in admin"	jester	wamberg	"== Steps to reproduce ==

1. Define a Model, whose field(s) specify `help_text`, e.g.:

{{{
class MyModel(Model):
    my_regular_field = CharField(max_length=255, help_text=""this is my regular field"")
    my_readonly_field = CharField(max_length=255, help_text=""this is my readonly field"")
}}}

2. Define a ModelAdmin for your Model, including one of its fields in `readonly_fields`, e.g.:

{{{
class MyModelAdmin(ModelAdmin):
    fields = 'my_regular_field', 'my_readonly_field'
    readonly_fields = 'my_readonly_field',
admin.site.register(MyModel, MyModelAdmin)
}}}

In the object view/edit screen, ""My regular field"" will have help text, ""My readonly field"" will not.

== Expectation ==

The expected behavior is that readonly fields will work just like ""regular"" fields, except their widget will be their plain value rather than a form element -- i.e., any string specified as ""help_text"" should be displayed after the field.

== Uneducated guesswork ==

I don't dig very deep into the workings of the admin very often, and so, obviously, what I'm about to say may be entirely unhelpful.  However, it appears that `helpers.AdminReadonlyField` constructs a limited, faux field object, a dict, at `self.field`, rather than assign the appropriate BoundField instance.  This is perhaps because readonly fields are not available to it in `self.form.fields`.  In the template, `field.field.field.help_text` fails, as the dict does not contain ""help_text"", (and I'm not sure where AdminReadonlyField would get it, anyway)."		closed	contrib.admin	1.2		fixed	readonly help_text		Ready for checkin	1	0	0	0	0	0
