Skip to main content

Multiple model/queryset view (and mixin) for Django Rest Framework

Project description

drf-multiple-models provides an easy view (and mixin) for serializing multiple models in a single view. It is built on top of (and meant to be an extension for) Django Rest Framework.

Installation

  1. Install the package from pip:

    pip install django-rest-multiple-models
  2. Make sure to add ‘drf_multiple_model’ to your INSTALLED_APPS:

    INSTALLED_APPS = (
        ...
        'drf_multiple_model',
    )
  3. Then simply import the view into any views.py in which you’d want to use it:

    from drf_multiple_model.views import MultipleModelAPIView

Usage

Documentation is on ReadTheDocs: https://django-rest-multiple-models.readthedocs.io/en/latest/

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

django-rest-multiple-models-2.1.3.tar.gz (8.0 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page