Open stefan6419846 opened 2 months ago
also if class looks something like this
class SomeClass(models.Model):
name=models.CharField(editable=False)
...
def __str__(self):
return self.name
in admin interface history
link crashes with error
TypeError at /admin/model/1/history/__str__ returned non-string (type of NoneType)
but the name
value of object definitely exists.
and if remove __str__ function - OK, history is showing...
Describe the bug
Opening a specific entry from the history shows the fields as editable, although there are no change permissions and there is no save button.
To Reproduce
Consider an admin page defined like this:
If relevant:
SIMPLE_HISTORY_REVERT_DISABLED = True
is set.Steps to reproduce the behavior:
Expected behavior
The specific version is shown as read-only form and does not allow saving.
Screenshots
Regular view:
Historic view:
Environment
Additional context
Additionally, it seems like the rendering of at least the heading is slightly different.