Changes between Initial Version and Version 1 of Ticket #5863, comment 38
- Timestamp:
- May 17, 2011, 8:41:22 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5863, comment 38
initial v1 1 1 @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__fieldand 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)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) 3 3 4 4 So 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 __unicodeetc cases can be easily and correctly filtered as is required to be done in list_filter.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. 6 6