Giter VIP home page Giter VIP logo

drf-dynamic-serializers's Introduction

drf-dynamic-serializers

GitHub PyPI release Documentation Build Status Coverage

Dynamic serializers and view(set)s for the Django REST Framework.

Functionality

DRF Dynamic Serializers is a package that aims to increase the reusability of Django REST Framework's serializer classes. Serializers that inherit from DynamicFieldsSerializer are dynamic. The fields to include and/or exclude can be overriden as well as the allow_null and required property of fields. A common use case is a list and a detail endpoint sharing the same serializer class but with different fields included.

Furthermore, the package provides a viewset class (DynamicFieldsModelViewSet) that extends Django REST Framework's ModelViewSet with the the ability to dynamically select the fields to include or exclude in a response by reading the fields and exclude query parameters of a request.

Documentation

For more information on installation and configuration see the documentation at:

https://drf-dynamic-serializers.readthedocs.io/

Issues

If you have questions or have trouble using the app please file a bug report at:

https://github.com/csdenboer/drf-dynamic-serializers/issues

Contributions

It is best to separate proposed changes and PRs into small, distinct patches by type so that they can be merged faster into upstream and released quicker:

  • features,
  • bugfixes,
  • code style improvements, and
  • documentation improvements.

All contributions are required to pass the quality gates configured with the CI. This includes running tests and linters successfully on the currently officially supported Python and Django versions.

The test automation is run automatically by Travis CI, but you can run it locally with the tox command before pushing commits.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.