diff options
| author | Tom Christie | 2012-09-07 09:36:52 +0100 |
|---|---|---|
| committer | Tom Christie | 2012-09-07 09:36:52 +0100 |
| commit | 01d6a0899e4435417f774196b08e0613bd0a51f7 (patch) | |
| tree | 118d29048d2df9100928830c6c65d45e590f0c6e /djangorestframework/mixins.py | |
| parent | c648f2786f37ffe0b64ed2d85de2b7b491ee341b (diff) | |
| download | django-rest-framework-01d6a0899e4435417f774196b08e0613bd0a51f7.tar.bz2 | |
Bits of cleanup
Diffstat (limited to 'djangorestframework/mixins.py')
| -rw-r--r-- | djangorestframework/mixins.py | 11 |
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 = { |
