I'm working on a Django project, and I'd like to use Django Simple History to track changes to records. However, I'm facing an issue: I don't want to track the user who made the change (I'm not using Django's auth app).
When I try to perform the migrations, I receive this error message:
SystemCheckError: System check identified some issues:
ERRORS:
my_app.HistoricalModel.history_user: (fields.E300) Field defines a relation with model
'auth.User', which is either not installed, or is abstract.
data_lake.HistoricalInstance.history_user: (fields.E307)
The field my_app.HistoricalInstance.history_user was declared with a lazy reference to
'auth.user', but app 'auth' isn't installed.
Is there a way to use the HistoricalRecords model disabling references to user model?
There are mentioning it in the documentation here
There are three parameters to
HistoricalRecordsorregisterthat facilitate the ability to track ahistory_usermanually:history_user_id_field,history_user_getter,history_user_setter.In your case, you might want to change the model of the user, you can do it when defining
HistoricalRecordsas well: