Skip to main content

More Cool Django Rest Framework Stuff

Project description

django-rest-framework-more

More Cool Django Rest Framework Stuff

install

pip3 install djangorestframework-more or pipenv install djangorestframework-more

features

NonPaginatedCSVRenderer

In case you want a CSV renderer that doesn't respect pagination:

# in settings.py
REST_FRAMEWORK = {
    'DEFAULT_RENDERER_CLASSES': [
        'rest_framework.renderers.JSONRenderer',
        'rest_framework.renderers.BrowsableAPIRenderer',
        'rest_framework_more.renderers.NonPaginatedCSVRenderer
    ]
}

If you'd like to learn more about using renderers in Django Rest Framework, see https://www.django-rest-framework.org/api-guide/renderers/#setting-the-renderers

Creater Model Serializer Class

# in serializers.py
from app.models import Car
from rest_framework_more.serializers import create_model_serializer_class

CarSerializer = create_model_serializer_class(model=Car)

contact

If you have any issues, feel free to post an issue at https://github.com/DanielJDufour/django-rest-framework-more/issues or email the package author at daniel.j.dufour@gmail.com

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

djangorestframework-more-0.1.0.tar.gz (2.3 kB view details)

Uploaded Source

File details

Details for the file djangorestframework-more-0.1.0.tar.gz.

File metadata

  • Download URL: djangorestframework-more-0.1.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.3

File hashes

Hashes for djangorestframework-more-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d26ded0a0953031cbacc3c0b386068085752482a3f0a579b8df9a155be7048ba
MD5 03f0652e170a62f1543c303668543994
BLAKE2b-256 e4b74ae5a906707784c8af8d7a65d5a75bffc47bf44e20a64c3b7403df77f759

See more details on using hashes here.

Provenance

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