#5863: list_display does not allow functions of referenced objects -------------------------------------+------------------------------------- Reporter: Beat | Owner: nobody Bolli <me+django@…> | Status: closed Type: | Component: contrib.admin Uncategorized | Severity: Normal Milestone: | Keywords: list_display Version: SVN | Has patch: 1 Resolution: wontfix | Needs tests: 0 Triage Stage: Design | Easy pickings: 0 decision needed | Needs documentation: 1 | Patch needs improvement: 1 | -------------------------------------+-------------------------------------
Comment (by brillgen): @lukeplant, the basic problem you've correctly raised is that list_display allows for callables and hence arbitrary names can be used which are simiar to the syntax for foreign key fields. However, this problem exists for list_filter also: someone may define a field with the name class__field and try to use that in list_filter as a foreign key field. (i've just checked that you can indeed name a field like that) So we can't really be compensating for dev stupidity at the cost of functionality as we haven't done in list_filter also. Since all FKs always start with an alphabet are in the regex format (.+__.+.*), the __unicode etc cases can be easily and correctly filtered as is required to be done in list_filter. -- Ticket URL: <http://code.djangoproject.com/ticket/5863#comment:38> 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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.