This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
# django-rest-framework-nested
Work in progress for nested support for django-rest-framework


```pip install django-rest-framework-nested```


'DEFAULT_FILTER_BACKENDS': ('rest_framework_nested_test.filters.NestedFilterBackend',)

from rest_framework import routers
from rest_framework_nested import routers as nested_routers
from django.conf.urls import url, include, patterns
import views

api_router = routers.DefaultRouter()

api_router.register(r'parent', views.ParentViewSet)
api_parent_router = nested_routers.NestedSimpleRouter(api_router, 'parent', lookup='parent')
api_parent_router.register(r'child', views.ChildViewSet)

urlpatterns = patterns(''
url(r'^api/', include(api_router.urls)),

from rest_framework import serializers
from rest_framework_nested import serializers as nested_serializers
import models

class ChildSerializer(nested_serializers.NestedHyperlinkedModelSerializer):
class Meta:
model = models.Child

class ParentSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = models.Parent

values = ChildSerializer(many=True, required=False, read_only=True)

from rest_framework import viewsets
import models, serializers

class ParentViewSet(viewsets.ModelViewSet):
API endpoint that allows Parent to be viewed or edited.
queryset = models.Parent.objects.get_queryset()
serializer_class = serializers.ParentSerializer

class ChildViewSet(viewsets.ModelViewSet):
API endpoint that allows Child to be viewed or edited.
queryset = models.Child.objects.get_queryset()
serializer_class = serializers.ChildSerializer


This package is licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
and can undestand more at on the
sidebar notes.

Apache Licence v2.0 is a MIT-like licence. This means, in plain English:
- Its trully open source
- You can use it as you wish, for money or not
- You can sublicence it (change the licence!!)
- This way, you can even use it on your closed-source project
As long as:
- You cannot use the authors name, logos, etc, to endorse a project
- You keep the authors copyright notices where this code got used, even on your closed-source project
(come on, even Microsoft kept BSD notices on Windows about its TCP/IP stack :P)
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-rest-framework-nested-0.0.1.tar.gz (3.3 kB) Copy SHA256 Checksum SHA256 Source May 14, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting