=================
django-json-patch
=================

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

`JSON Patch <http://jsonpatch.com/>`_ support for Django models.

Documentation
-------------

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

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)

=================
django-json-patch
=================

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

`JSON Patch <http://jsonpatch.com/>`_ 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)

Convert readthedocs links for their .org -> .io migration for hosted projects
Convert readthedocs links for their .org -> .io migration for hosted projects

As per [their blog post of the 27th April](https://blog.readthedocs.com/securing-subdomains/) ‘Securing subdomains’:

> Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard.

Test Plan: Manually visited all the links I’ve modified.
