diff --git a/rest_framework/renderers.py b/rest_framework/renderers.py index 4b9ba3eb0..d12de4d54 100644 --- a/rest_framework/renderers.py +++ b/rest_framework/renderers.py @@ -799,7 +799,7 @@ class DocumentationRenderer(BaseRenderer): format = 'html' charset = 'utf-8' template = 'rest_framework/docs/index.html' - code_style = 'default' + code_style = 'emacs' def get_context(self, data): from pygments.formatters import HtmlFormatter diff --git a/rest_framework/templates/rest_framework/docs/index.html b/rest_framework/templates/rest_framework/docs/index.html index 0a5fd2eb5..8e454dc57 100644 --- a/rest_framework/templates/rest_framework/docs/index.html +++ b/rest_framework/templates/rest_framework/docs/index.html @@ -57,7 +57,7 @@ const coreapi = window.coreapi const codec = new coreapi.codecs.CoreJSONCodec() - const schema = {{ schema }} + const schema = '{"_type": "document"}' {{ schema }} const doc = codec.decode(schema, {preloaded: true}) const client = new coreapi.Client() diff --git a/rest_framework/templatetags/rest_framework.py b/rest_framework/templatetags/rest_framework.py index 6427308d9..014010562 100644 --- a/rest_framework/templatetags/rest_framework.py +++ b/rest_framework/templatetags/rest_framework.py @@ -53,7 +53,7 @@ def do_code(parser,token): class CodeNode(template.Node): - style = 'default' + style = 'emacs' def __init__(self, lang, code): self.lang = lang