#36127: The link is not displayed when str is blank in admin.
-------------------------------+------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: Bug | Status: assigned
Component: contrib.admin | Version: 5.1
Severity: Normal | Resolution:
Keywords: link | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------+------------------------------------
Comment (by Raphael Gaschignard):
I do not know how appropriate it would be as a solution, but it is
possible with CSS to detect empty anchor tags and then add a *touch* of
content:
{{{
a:empty::after {
/* insert two non-blocking spaces, making the link appear */
content: '\00A0\00A0';
}
}}}
The point here being that there could be some fallback in the admin in
particular for this issue (that feels pretty easy to accidentally do when
not careful with __str__). Could even put in text like "(blank)". But then
we're looking at translation strings in CSS...
--
Ticket URL: <https://code.djangoproject.com/ticket/36127#comment:9>
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 view this discussion visit
https://groups.google.com/d/msgid/django-updates/010701950338235c-8a1a4021-3d18-4b71-bdaa-99e533c6e1a5-000000%40eu-central-1.amazonses.com.