Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

Json Patch support for Django models

Project description

https://travis-ci.org/CptLemming/django-json-patch.png?branch=master

JSON Patch support for Django models.

Documentation

The full documentation is at https://django-json-patch.readthedocs.io.

Install

Install django-json-patch:

pip install django-json-patch

Usage

from json_patch.patch import Patch
from models import Author

authors = Author.objects.all()

add_author = [
    {
        'op': 'add',
        'path': '/0',
        'value': {
            'id': 1,
            'name': 'Bob'
        }
    }
]

patch = Patch(add_author_diff)
patch.apply(authors)

History

0.1.0 (2015-10-02)

  • First release on PyPI.

Project details


Release history Release notifications

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page