Skip to content

shea-maykinmedia/djangorestframework-hal

 
 

Repository files navigation

Version:0.1.0
Source:https://bitbucket.org/maykinmedia/djangorestframework_hal
Keywords:<keywords>
PythonVersion:3.6

build-status Requirements status Coverage status

python-versions django-versions pypi-version

HAL support for Django REST framework

  • Python 3.6 or above
  • setuptools 30.3.0 or above
  • Django 1.11 or above
  • Django REST Framework supporting the version of Django you are using
pip install djangorestframework_hal

Add the render and parser to your django settings file.

REST_FRAMEWORK = {

  'DEFAULT_RENDERER_CLASSES': (
      'djangorestframework_hal.renderers.HalJSONRenderer',
      # Any other renders
  ),

  'DEFAULT_PARSER_CLASSES': (
      'djangorestframework_hal.parsers.HalJSONParser',
      # Any other parsers
  ),
}

By default the package uses rest_framework.renderers.JSONRenderer. If you want to use another renderer , you must specify it in your django settings file.

HAL_JSON = {
  'RENDERER_CLASS': 'djangorestframework_camel_case.render.CamelCaseJSONRenderer',
  }
python runtest tests.tests

About

A HAL renderer for DRF

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%