diff options
| author | Tom Christie | 2011-04-28 19:54:30 +0100 |
|---|---|---|
| committer | Tom Christie | 2011-04-28 19:54:30 +0100 |
| commit | 93aa065fa92f64472a3ee80564020a81776be742 (patch) | |
| tree | d1bfa96d3027545006b7a0f542a32f53a946153b /examples/pygments_api | |
| parent | ad552107ff9b6f844982bd3c562d69f890febf1f (diff) | |
| download | django-rest-framework-93aa065fa92f64472a3ee80564020a81776be742.tar.bz2 | |
emitters -> renderers
Diffstat (limited to 'examples/pygments_api')
| -rw-r--r-- | examples/pygments_api/views.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/pygments_api/views.py b/examples/pygments_api/views.py index 4e6d1230..278e8250 100644 --- a/examples/pygments_api/views.py +++ b/examples/pygments_api/views.py @@ -4,7 +4,7 @@ from django.core.urlresolvers import reverse from djangorestframework.resource import Resource from djangorestframework.response import Response -from djangorestframework.emitters import BaseEmitter +from djangorestframework.renderers import BaseRenderer from djangorestframework import status from pygments.formatters import HtmlFormatter @@ -32,8 +32,8 @@ def remove_oldest_files(dir, max_files): [os.remove(path) for path in list_dir_sorted_by_ctime(dir)[max_files:]] -class HTMLEmitter(BaseEmitter): - """Basic emitter which just returns the content without any further serialization.""" +class HTMLRenderer(BaseRenderer): + """Basic renderer which just returns the content without any further serialization.""" media_type = 'text/html' @@ -68,8 +68,8 @@ class PygmentsRoot(Resource): class PygmentsInstance(Resource): """Simply return the stored highlighted HTML file with the correct mime type. - This Resource only emits HTML and uses a standard HTML emitter rather than the emitters.DocumentingHTMLEmitter class.""" - emitters = (HTMLEmitter,) + This Resource only emits HTML and uses a standard HTML renderer rather than the renderers.DocumentingHTMLRenderer class.""" + renderers = (HTMLRenderer,) def get(self, request, unique_id): """Return the highlighted snippet.""" |
