From 0ea64f6b33dda111ae7d544ba95bdd1f3211e16a Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Thu, 16 Jul 2015 10:19:27 +0100 Subject: [PATCH] More docs on configuring a custom metadata class. --- docs/api-guide/metadata.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/api-guide/metadata.md b/docs/api-guide/metadata.md index 017274405..e12aeb7fd 100644 --- a/docs/api-guide/metadata.md +++ b/docs/api-guide/metadata.md @@ -98,6 +98,12 @@ The following class could be used to limit the information that is returned to ` 'description': view.get_view_description() } +Then configure your settings to use this custom class: + + REST_FRAMEWORK = { + 'DEFAULT_METADATA_CLASS': 'myproject.apps.core.MinimalMetadata' + } + [cite]: http://tools.ietf.org/html/rfc7231#section-4.3.7 [no-options]: https://www.mnot.net/blog/2012/10/29/NO_OPTIONS [json-schema]: http://json-schema.org/