Changes between Initial Version and Version 1 of Ticket #5863, comment 38


Ignore:
Timestamp:
May 17, 2011, 8:41:22 AM (13 years ago)
Author:
Jannis Leidel

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5863, comment 38

    initial v1  
    11@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.
    2 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)
     2However, 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)
    33
    44So we can't really be compensating for dev stupidity at the cost of functionality as we haven't done in list_filter also.
    5 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.
     5Since 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.
    66
Back to Top