class(admin.ModelAdmin): """ModelAdmin class that prevents modifications through the admin. The changelist and the detail view work, but a 403 is returned if one actually tries to edit an object. """
actions = None
defget_readonly_fields(self, request, obj=None): return self.fields or [f.name for f in self.model._meta.fields]
近期评论