aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/mixins.py
diff options
context:
space:
mode:
authorTom Christie2012-09-07 09:36:52 +0100
committerTom Christie2012-09-07 09:36:52 +0100
commit01d6a0899e4435417f774196b08e0613bd0a51f7 (patch)
tree118d29048d2df9100928830c6c65d45e590f0c6e /djangorestframework/mixins.py
parentc648f2786f37ffe0b64ed2d85de2b7b491ee341b (diff)
downloaddjango-rest-framework-01d6a0899e4435417f774196b08e0613bd0a51f7.tar.bz2
Bits of cleanup
Diffstat (limited to 'djangorestframework/mixins.py')
-rw-r--r--djangorestframework/mixins.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/djangorestframework/mixins.py b/djangorestframework/mixins.py
index 2f78876f..4b833aac 100644
--- a/djangorestframework/mixins.py
+++ b/djangorestframework/mixins.py
@@ -1,3 +1,12 @@
+"""
+Basic building blocks for generic class based views.
+
+We don't bind behaviour to http method handlers yet,
+which allows mixin classes to be composed in interesting ways.
+
+Eg. Use mixins to build a Resource class, and have a Router class
+ perform the binding of http methods to actions for us.
+"""
from djangorestframework import status
from djangorestframework.response import Response
@@ -68,6 +77,8 @@ class MetadataMixin(object):
"""
Return a dicitonary of view metadata.
Should be mixed in with any `BaseView`.
+
+ This mixin is typically used for the HTTP 'OPTIONS' method.
"""
def metadata(self, request, *args, **kwargs):
content = {