Recursive Serialization for Django REST framework
This package provides a RecursiveField
that enables you to serialize a tree, linked list, or even a directed acyclic graph. Also supports validation, deserialization, ModelSerializers, and multi-step recursive structures.
from rest_framework import serializers from rest_framework_recursive.fields import RecursiveField class TreeSerializer(serializers.Serializer): name = serializers.CharField() children = serializers.ListField(child=RecursiveField())
see here for more usage examples
Install using pip
...
$ pip install djangorestframework-recursive
Install testing requirements.
$ pip install -r requirements.txt
Run with runtests.
You can also use the excellent tox testing tool to run the tests against all supported versions of Python and Django. Install tox globally, and then simply run:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4