History of a ManyToManyField in django-simple-history

Story short, I need to save in the history the changes made on a Many-To-Many fields of one of my models. I can see from:...

django-simple-history cannot import name error for model import in management command

I am using django-simple-history for maintaining the history for each model. Now when I import the model in my management command it gives import error "cannot find import name 'ModelName'". Any...

How can I store history of ManyToManyField using django-simple-history.

How can I store history of ManyToManyField using django-simple-history. I used HistoricalRecords with attribute m2m_filds but it is throwing error: unexpected keyword argument 'm2m_fields'

django simple history - using model methods?

I'm using django-simple-history: http://django-simple-history.readthedocs.io/en/latest/ I have a model, which I would like to apply its methods on an historical instance. Example: from...

Getting rest history from Django simple History

I am using django-simple-history (1.8.1) and DRF (3.5.3). I want to get a rest service containing the history of each element. Let's take an example ! models.py class Product(models.Model): ...

How to revert changes, specifically deletions, with django-simple-history

We have django-simple-history set up for our models. Recently a whole bunch of models were mysteriously deleted. This was noticed a few days after the fact, so it would be nice to avoid a full DB...

Aggregation of an annotation in GROUP BY in Django

UPDATE Thanks to the posted answer, I found a much simpler way to formulate the problem. The original question can be seen in the revision history. ##The problem I am trying to translate an SQL...

django-simple-history, displaying changed fields in admin

When I inherit from admin.ModelAdmin, in history on admin page I can see what fields has been changed. However, now I need to use django-simple-history to track all my model changes. Now, for...

Remove history button from Django admin

I want to enable/disable history from django admin button based on the type of user. My end goal here is to be able to understand how to show hide this button.

django simple history - how to create history when the object is not created in admin

I'm using django-simple-history==1.9.0 package with django 1.8. When I create an object outside the admin and then look at the history of the object in the admin page, it shows a message This...

Python caching previous object properties across new instances

I've run into an odd issue. It started with trying to create objects in django in a loop. I have an override on the model save() that does something like self.history.append(new_status) Now, I...

Django admin change history log

Django admin includes a "History" page, which shows the modification history for a given model. In different models, the changed field is shown either as an "Act" or as a "Comment": Is it...

django-simple-history track User from python shell

We are using django-simple-history to track changes in our models. All models have a history = HistoricalRecords() field. When making changes to a model from the python shell, the changes are...

Django AWS Elastic Beanstalk error ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

I know this error have come to many people and I have tried different solutions and none of them worked. I am using aws eb cli. I am using following command eb deploy to deploy my application to...

Customer user model error; ModuleNotFoundError: No module named 'account'

I am very new to using Django and I am trying to make a custom user model for my Android app. Unfortunately the custom user class is necessary. I keep encountering this error ModuleNotFoundError:...

django-simple-history is storing changes twice

I tried django-simple-history and I discovered that every create or update is stored twice in the history model. I don't know which information is now useful for you to help me, but I use CBV's...

Django-simple-history to display logs on webpage other than admin website

I have been successful to register Django-simple-history with admin page. I have now been trying to get audit (CRUD) logs to display on a webpage other than the admin site. The page currently...

How to configure a Daphne server to invite clients to add the Certificate Authority that issued my certificate if they hadn't done it yet?

If I make a request to my Daphne/Django server in Postman or the Android app we're developing, Daphne serves the certificate, but it's rejected. If I first make a simple get request to...

How to configure NGINX for Vue and Django?

I was following this tutorial to create a backend and it worked. I made simple a Django REST admin panel to upload images, it worked. Then I created Vue frontend app, run npm run serve while in...

cannot import name 'UnpickleError' from rq.exceptions

I get an error when i run my image with docker-compose this is my pipfile with the library rq i try to up the image but i get an error in django-rq, but i not change this library i only add in my...

How to display Historical table of django-simple-history in Django admin site?

I have implemented Historical tracking of changes to objects in Django using django-simple-history https://django-simple-history.readthedocs.io/en/2.10.0/index.html I have mentioned a field...

Django Simple History - Tracking M2M field changes (with "through")

I am using django-simple-history to track changes to my fields, and from what I see, it seems like django-simple-history does not track changes to M2M fields. I tried introducing an intermediate...

Docker: Pull from docker hub, doesn't download any files

It's my second day playing with docker, I'm trying to make a simple django web server with docker. So basically I created a Dockerfile and docker-compose.yml files in my directory, I have my...

Django model history with foreign keys history tracking using django-simple-history

I have three models with historical records: class WifiUser(models.Model): .... wifiDevice = models.OneToOneField(WifiDevice, on_delete=models.CASCADE, default=None) wifiSim =...

Django - display multiple views in one template

I am currently working on a Django project, in which I want to build a kind of dashboard, which may have actually two bootstrap columns (in the future maybe 3-4). In each column, content from a...

Simple Django Project Structure

I have built the virtual environment and root directory for my django project, which will be a simple website for a event venue. The site will simply have a few different tabs on the navigation...

AttributeError: 'NoneType' object has no attribute 'history_change_reason'

I am saving change history on every change in django model by using django-simple-history. that what I tried: class MyModel(models.models): field1 = ... ... history =...

Cannot assign "<User: user.name>: must be a "User" instance

I am having an issue writing a custom django migration where I am trying to set a field value for a model to a user. The model in question is shown below (CustomerMachine). This model uses the...

Python version mismatch for Azure Web App

I have created a web app on Microsoft Azure and choosen Python 3.8 as configuration. Then I set up a deployment pipeline on Azure DevOps which deploys a django app into the web app. The deployment...

How can I solve the issue: No module named 'simple_history'

I have my application and I would like to track the historical models for each modification in Django. I have followed the instruction in this link:...