#35765: Change label of list_display with __ lookup to only show the bit after the __ --------------------------------+-------------------------------------- Reporter: Kevin Renskers | Owner: (none) Type: Uncategorized | Status: closed Component: contrib.admin | Version: 5.0 Severity: Normal | Resolution: wontfix Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 --------------------------------+-------------------------------------- Comment (by Tom Carrick):
Yes. In fact before this feature it was the only good way to do it. The downside is you will need to define your own ordering and so: {{{ @admin.display(description="Category", ordering="category__name") def category_name(obj): return obj.category.name }}} -- Ticket URL: <https://code.djangoproject.com/ticket/35765#comment:5> 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 on the web visit https://groups.google.com/d/msgid/django-updates/01070191fa5092de-429e857a-4b1e-4e28-a5de-e28aca7067c2-000000%40eu-central-1.amazonses.com.