#15968: readonly_fields ignore form field label
-----------------------+-------------------------------
 Reporter:  gabomdq@…  |          Owner:  nobody
     Type:  Bug        |         Status:  new
Milestone:             |      Component:  contrib.admin
  Version:  1.3        |       Severity:  Normal
 Keywords:             |   Triage Stage:  Unreviewed
Has patch:  0          |  Easy pickings:  0
-----------------------+-------------------------------
 {{{
 class MyForm(ModelForm):
     test_field_callable = CharField(label=_('This is a test label'))

 class MyAdmin(ModelAdmin)
     form = MyForm
     readonly_fields=['test_field_callable',]

 class MyModel(Model)
     def test_field_callable(self):
         print 'test content'
 }}}

 I'm using the previous pseudo code as a guide to explain what happens,
 it's not a complete test case. If the field test_field_callable is not
 listed on readonly_fields, I get the proper label displayed on the Admin.
 However, with the readonly_fields listing test_field_callable, the label
 printed is "Test Field Callable" (a beautified version of the field name
 instead of the label I specified on the form).

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15968>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to