1๐
โ
if you want to filter Investment by the issuer_id you can simply change the list_filter in ModelAdmin like this
@admin.register(Investment)
class Investment_Register(admin.ModelAdmin):
list_filter = ["offering__issuer__id"]
and then pass the id of issuer to URL like this
http://localhost:8000/app/investment/?offering__issuer__id={id-issuer}
note: if you give an error like this
(admin.E116) The value of 'list_filter[0]' refers to 'offering__issuer__id', which does not refer to a Field.
add field id minimally to your model
๐คNova
Source:stackexchange.com