Skip to main content

drf_changemgmt

build-status-image pypi-version

Overview

Django Rest Framework dirty tracking

Requirements

  • Python (2.7, 3.3, 3.4)

  • Django (1.6, 1.7, 1.8)

  • Django REST Framework (2.4, 3.0, 3.1)

Installation

Install using pip…

$ pip install drf_changemgmt

Example

from .models import Actor
from drf_changemgmt import ChangeMgmtSerializerMixin
from rest_framework.serializers import ModelSerializer

class ActorSerializer(ChangeMgmtSerializerMixin, ModelSerializer):
    """ Actor model serializer """

    class Meta(object):
        """ DRF ModelSerializer meta object """

        model = Actor

...
...

def pre_save(..):
    changed = model.get_changed_fields()
    if 'superuser_role' in changed:
        raise PermissionDenied("you can't do that!")

Testing

Install testing requirements.

$ pip install -r requirements.txt

Run with runtests.

$ ./runtests.py

You can also use the excellent tox testing tool to run the tests against all supported versions of Python and Django. Install tox globally, and then simply run:

$ tox

Documentation

To build the documentation, you’ll need to install mkdocs.

$ pip install mkdocs

To preview the documentation:

$ mkdocs serve
Running at: http://127.0.0.1:8000/

To build the documentation:

$ mkdocs build

Metadata

Release files for drf_changemgmt 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for drf_changemgmt 0.1.0
File Size Uploaded Provenance Actions
drf_changemgmt-0.1.0.tar.gz 4.8 kB Without provenance Details for drf_changemgmt-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for drf_changemgmt 0.1.0
File Interpreter ABI Platform Actions
drf_changemgmt-0.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for drf_changemgmt-0.1.0-py2.py3-none-any.whl

Total release size: 9.2 kB

Release files / drf_changemgmt-0.1.0.tar.gz

Download URL drf_changemgmt-0.1.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
86d4a0171e171cfed0efdd77ba5d8d5c5a8508f0cd35e2493f532def4568f681
BLAKE2b-256 checksum
How to use checksums
8a5aeff073956660c04096afe5036d81e5d5e5c2a8959780a7e7fb9f3f92ef53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / drf_changemgmt-0.1.0-py2.py3-none-any.whl

Download URL drf_changemgmt-0.1.0-py2.py3-none-any.whl
Size 4.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0aab9d7d9219c14943c4474276989be92076c09cb49db611eeb43f9d8589d064
BLAKE2b-256 checksum
How to use checksums
361f78edd5265365238ed52456267d5eca517a02f2d3cdad1c6bc25981587b50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for drf_changemgmt 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page