daniyalzade / django_reverse_admin

Django Reverse Admin
BSD 3-Clause "New" or "Revised" License
199 stars 54 forks source link

Exclude some fields by conditions #282

Open huxaiphaer opened 3 years ago

huxaiphaer commented 3 years ago

Can I exclude a field by a condition e.g filtering by role and then exclude a field like zipcode

class PersonAdmin(ReverseModelAdmin):
    inline_type = 'tabular'
    inline_reverse = ['business_addr',
                      ('home_addr', {'fields': ['street', 'city', 'state', 'zipcode']}),
                      ]