#25465: Line breaks in readonly field in admin tabular inline
-------------------------------+----------------------------
     Reporter:  pcraston       |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  contrib.admin  |    Version:  1.8
     Severity:  Normal         |   Keywords:  tabular inline
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+----------------------------
 If a model TextField is rendered as read-only inside a included fieldset
 or an admin.TabularInline section, line breaks are ignored.

 This is because of the changes made in
 
https://github.com/django/django/commit/c94bff2b26f8844fe15d68a79511ff3a6853dc61
 :
 to these files:
 django/contrib/admin/templates/admin/edit_inline/tabular.html
 django/contrib/admin/templates/admin/includes/fieldset.html

 Specifically the following code change in both files:
 {{{
 {% if field.is_readonly %}
 -                  <p>{{ field.contents|linebreaksbr }}</p>
 +                  <p>{{ field.contents }}</p>
 }}}

 The linebreaksbr template tag was removed but the
 django/contrib/admin/helpers.py:186 linebreaksbr function is only applied
 to custom ModelAdmin methods but not plain admin fields

 Am I missing something or is this a bug?

--
Ticket URL: <https://code.djangoproject.com/ticket/25465>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.49cfa1fc413000b2c7b59d314536d1db%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to