#27386: Readonly callable field is unconditionally wrapped inside <p>...</p>, 
which
might create invalid HTML
-------------------------------------+-------------------------------------
     Reporter:  Jacob Rief           |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  contrib.admin        |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  callable field       |             Triage Stage:  Accepted
  is_readonly <p>                    |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Jacob Rief):

 Yes, changing this could add a minor backwards compatibility problem;
 something probably not really noticeable and if, easy to fix.

 I looked at the code. We presumably should add another tag to
 ``django.contrib.admin.helpers.AdminReadonlyField.__init__`` named
 ``is_callable`` which is ``True`` for callable fields. Then in the
 templates, we'd have to add another ``{% if field.is_callable %}`` and
 only wrap the content inside ``<p>..</p>`` it that's false.

 If this proposal is accepted, I will implement it right now.

--
Ticket URL: <https://code.djangoproject.com/ticket/27386#comment:4>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.178c6adb29e4332ef328c4fd944301a3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to