#36127: The link is not displayed when str is blank in admin.
--------------------------+-----------------------------------------
     Reporter:  Antoliny  |                     Type:  Uncategorized
       Status:  new       |                Component:  contrib.admin
      Version:  5.1       |                 Severity:  Normal
     Keywords:  link      |             Triage Stage:  Unreviewed
    Has patch:  0         |      Needs documentation:  0
  Needs tests:  0         |  Patch needs improvement:  0
Easy pickings:  0         |                    UI/UX:  0
--------------------------+-----------------------------------------
 In the admin page, there are parts where the model's `__str__` value is
 used, providing links that allow navigation to the object when the value
 is clicked.
 However, when `__str__` is blank, while it’s not an issue for the value to
 appear as blank, the `<a>` tag's `innerHTML` being empty prevents the
 layout from being displayed on the screen, and it also cannot function as
 a link.
 [[Image(not_link_example.png)]]
 While it’s very rare for a user to assign a blank value to `__str__`, I
 still believe that it should at least function as a link.
 Just like with fields, when the value is blank, a default value such as
 "-" should be used to ensure that it can at least function as a link.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36127>
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 view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019492f651ad-832fd397-ceec-4b8b-8d33-259a11bec6f2-000000%40eu-central-1.amazonses.com.

Reply via email to