You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know how to add the change reason field in the admin form.
I have followed the instructions adding SIMPLE_HISTORY_HISTORY_CHANGE_REASON_USE_TEXT_FIELD=True to the settings.py file.
I also tried defining a model like this.
from django import forms
from .models import Identity
class IdentityForm(forms.ModelForm):
class Meta:
model = Identity
fields = ['type', 'country', '_change_reason'] #Also tried with 'history_change_reason'
But I got an error saying that the field _change_reason couldn't be found. Unknown field(s) (change_reason) specified for Identity