Skip to main content

build-status-image pypi-version

Overview

Django Rest Framework change management

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 drfchangemgmt

Example

from .models import Actor
from drfchangemgmt 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 drfchangemgmt 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 drfchangemgmt 0.1.0
File Size Uploaded Provenance Actions
drfchangemgmt-0.1.0.tar.gz 4.8 kB Without provenance Details for drfchangemgmt-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 9.2 kB

Release files / drfchangemgmt-0.1.0.tar.gz

Download URL drfchangemgmt-0.1.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5116dc2c42eba720a5d16f2780b2ef3cdb5ee74370bb4d92f969929c2cd0168c
BLAKE2b-256 checksum
How to use checksums
d630ae93a0ed8f0dc608fa23af3b89671830db6fb62424aec02345c3c1bfb3db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

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

Security for drfchangemgmt 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