`list_display_links` does not respect an empty tuple.
|Reported by:||mdh||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The admin's change list page will link the first column to the change page for each item even if you explicitly specify an empty tuple as the value of
list_display_links. Although it is unusual not to want any of the columns to link to the default change page, this can come up if you are using other extensions to the admin to build a custom interface for a given model. The underlying issue is very easy to address: it arises because the admin uses an empty tuple as the default value, when it could just as easily have used
None as the default value instead.
I've attached a simple patch. It's not obvious to me how to test this with the test fixtures currently available, so I haven't written any tests. If people like this but think it needs tests and can give me a hint about how to approach them I'd be happy to write them.