burke-software / django-mass-edit

Make bulk changes in the Django admin interface
152 stars 67 forks source link

It should not list excluded fields as read only or unique #102

Open atleta opened 2 years ago

atleta commented 2 years ago

I don't want read only fields to be displayed (in my case it's just cruft that confuses the user). However, listing them in massadmin_exclude doesn't work, because it's only checked for fields that are not read only or unique.

The order of the checks should be reversed in the template (admin/includes/mass_fieldset.html) so that the first (outermost) if statement verifies if the field is inmassadmin_exclude. If not then it can go on to the current logic. This way it's still possible to display the read only and unique fields as such but they can also be hidden by adding them tomassadmin_exclude`.