diff options
| author | Tom Christie | 2012-10-10 09:36:18 +0100 |
|---|---|---|
| committer | Tom Christie | 2012-10-10 09:36:18 +0100 |
| commit | 44281c39961a7fd2131a516f905cd28c0c95efcc (patch) | |
| tree | a701c1f687ac61d0aebe8dcc1ab3a85adeb41a2d /rest_framework/resources.py | |
| parent | a3ab66eca4be63ae35ae0c7a45267c9458fd7fcf (diff) | |
| download | django-rest-framework-44281c39961a7fd2131a516f905cd28c0c95efcc.tar.bz2 | |
Remove 'tut 6 - resources' from the docs, since it doesn't exist yet
Diffstat (limited to 'rest_framework/resources.py')
| -rw-r--r-- | rest_framework/resources.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rest_framework/resources.py b/rest_framework/resources.py index 493457e3..bb3d581f 100644 --- a/rest_framework/resources.py +++ b/rest_framework/resources.py @@ -1,3 +1,5 @@ +##### RESOURCES AND ROUTERS ARE NOT YET IMPLEMENTED - PLACEHOLDER ONLY ##### + from functools import update_wrapper import inspect from django.utils.decorators import classonlymethod @@ -14,6 +16,8 @@ def wrapped(source, dest): return dest +##### RESOURCES AND ROUTERS ARE NOT YET IMPLEMENTED - PLACEHOLDER ONLY ##### + class ResourceMixin(object): """ Clone Django's `View.as_view()` behaviour *except* using REST framework's @@ -57,10 +61,14 @@ class ResourceMixin(object): return view +##### RESOURCES AND ROUTERS ARE NOT YET IMPLEMENTED - PLACEHOLDER ONLY ##### + class Resource(ResourceMixin, views.APIView): pass +##### RESOURCES AND ROUTERS ARE NOT YET IMPLEMENTED - PLACEHOLDER ONLY ##### + class ModelResource(ResourceMixin, views.APIView): root_class = generics.ListCreateAPIView detail_class = generics.RetrieveUpdateDestroyAPIView |
