﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29927	ModelAdmin.exclude ignored when generating readonly view	Ben Cole	nobody	"Fields added to a `ModelAdmin.exclude` are not excluded when generating a ""readonly"" view as per the new functionality

{{{
Class MyModel(models.Model):
    field_to_show = models.TextField(default='foo')
    field_to_exclude = models.TextField(default='should be hidden')
}}}
{{{
@admin.register(MyModel)
Class MyModelAdmin(admin.ModelAdmin):
    exclude = ('field_to_exclude',)

    def has_change_permission(self, request, obj=None):
        return False
}}}

In the above example the `field_to_exclude` will be rendered on the ""readonly"" change view"	Bug	closed	contrib.admin	2.1	Normal	worksforme			Unreviewed	0	0	0	0	0	0
