Skip to main content

Django Rest Framework extension for implement by action serializers, permissions & /etc

Project description

Django Rest Framework Extended ViewSet

https://pypi.python.org/pypi/drf_extended_viewset https://travis-ci.com/ivlevdenis/drf_extended_viewset https://drf-extended-viewset.readthedocs.io/en/latest/?badge=latest https://pyup.io/repos/github/ivlevdenis/drf_extended_viewset/

Django Rest Framework extension for implement by action serializers, permissions & /etc

Dependencies

  • Python 3.7+
  • Django 2.0+
  • Django Rest Framework 3.10+

Setup

You can install the library directly from pypi using pip:

$ pip install drf-extended-viewset

License

Free software: MIT license

Features

class MyModelViewSet(ExtendedModelViewSet):
    serializer_class_map = {
        'list': ListMyModelSerializer,
        'retrieve': RetrieveMyModelSerializer,
        'update': UpdateMyModelSerializer,
        ...
    }
    permission_classes_map = {
        'list': AllowAny,
        'retrieve': IsAuthenticated,
        'update': (IsOwner | IsAdminUser),
        ...
    }

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drf_extended_viewset-0.1.1.tar.gz (8.9 kB view hashes)

Uploaded Source

Built Distribution

drf_extended_viewset-0.1.1-py2.py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page