Add documentation for the lookup_allowed method
|Reported by:||3point2||Owned by:||nobody|
|Has patch:||no||Needs documentation:||yes|
|Needs tests:||no||Patch needs improvement:||no|
Right now, as a result of the security fix introduced in r15031, the only way to allow querystring lookups across relationships in the admin is to whitelist them by including them in list_filter.
However, in my application the lookup that needs to be whitelisted generates a huge filter widget as it contains thousands of instances.
It would be helpful if I could whitelist the exact lookup I need to link to without having to generate the filter widget itself.
class MyModelAdmin(ModelAdmin): allow_lookup = ["fieldname__id__exact"]
would do. If the developers agree this is useful functionality, I could write a patch.
Change History (7)
comment:1 Changed 4 years ago by julien
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Resolution set to wontfix
- Status changed from new to closed
comment:2 Changed 4 years ago by 3point2
- Resolution wontfix deleted
- Status changed from closed to reopened
comment:3 Changed 4 years ago by Fandekasp
- Cc lemaire.adrien@… added
- Easy pickings set
- Needs documentation set
- Summary changed from Add additional lookup_allowed whitelist functionality to ModelAdmin to Add documentation for the lookup_allowed method
- Triage Stage changed from Unreviewed to Accepted
comment:4 Changed 4 years ago by julien
- Triage Stage changed from Accepted to Design decision needed