We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
from django.contrib import admin from .models import Package from simple_history.admin import SimpleHistoryAdmin class ReadonlyHistoryAdmin(SimpleHistoryAdmin): def has_add_permission(self, request): return False def has_change_permission(self, request, obj=None): return False def has_delete_permission(self, request, obj=None): return False admin.site.register(Package, ReadonlyHistoryAdmin)
If relevant: SIMPLE_HISTORY_REVERT_DISABLED = True is set.
SIMPLE_HISTORY_REVERT_DISABLED = True
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.
The text was updated successfully, but these errors were encountered:
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
history
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...
name
Sorry, something went wrong.
fixes jazzband#1362: incorrect rendering of history change form if ha…
b82b9d1
…s_change_permission returns False
No branches or pull requests
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.
The text was updated successfully, but these errors were encountered: