Django

Web Development

04 April, 2022

Django
Mayur Rajeshkumar Ariwala

Mayur Rajeshkumar Ariwala

Tech Lead, Softices

Model history tracking is a feature which tracks the changes in model object, it tracks things like what change you made in it and when you deleted it. It also helps in the recovery of deleted object of model.

Features

  • Customize history
  • Display old and new value of model's change field.
  • Simple admin integration

Project description

#django-old-new-history

django-old-new-history is customize history feature which is used to show the old and new value of model's change field in history action of admin panel.

Installation

Just use: ::

pip install django-old-new-history

Setup

Add django_old_new_history to INSTALLED_APPS in your settings.py, e.g.: ::

INSTALLED_APPS = [

...

'django_old_new_history',

...

Usage

Inherit from DjangoOldNewHistory to get the custom history feature. admin.py e.g.: ::

from django.contrib import admin

from .models import ExampleModel

from django_old_new_history.admin import DjangoOldNewHistory


@admin.register(ExampleModel)

class ExampleModelAdmin(DjangoOldNewHistory, admin.ModelAdmin):

  ...

Screenshot

Here is screenshot of django-old-new-history

django-old-new-history


Augmented Reality

Previous

Augmented Reality (AR) Guideline in iOS

Next

Cost to Develop Fantasy Sports App: Entire Breakdown

cost-to-develop-fantasy-sports-app

Frequently Asked Questions (FAQs)

It’s a Django package created by Softices that automatically tracks changes in your model instances. It records when any field changes, retains values before/after edits, and even captures deletions—making data history and recovery seamless. 

  • Customizable history tracking: Choose which models are tracked.  
  • Field-by-field change logs: View precisely what was changed from old to new values.  
  • Seamless admin integration: Enables historic data viewing directly in Django admin.