./flywheel/emitters.py

This commit is contained in:
tom christie tom@tomchristie.com 2011-01-27 22:00:34 +00:00
parent 0bc9d3ae0d
commit 110bf85aeb
3 changed files with 8 additions and 6 deletions

View File

@ -3,7 +3,7 @@
.. module:: authenticators
The authenticators module provides a standard set of authentication methods that can be plugged in to a :class:`Resource`, as well as providing a template by which to write custom authentication methods.
The authenticators module provides a standard set of authentication methods that can be plugged in to a :class:`.Resource`, as well as providing a template by which to write custom authentication methods.
The base class
--------------
@ -18,7 +18,7 @@ All authenticators must subclass the :class:`BaseAuthenticator` class and overri
The default permission checking on :class:`.Resource` will use the allowed_methods attribute for permissions if the authentication context is not None, and use anon_allowed_methods otherwise.
The authentication context is passed to the method calls (eg :meth:`.Resource.get`, :meth:`.Resource.post` etc...) in order to allow them to apply any more fine grained permission checking at the point the response is being generated.
The authentication context is passed to the handler calls (eg :meth:`.Resource.get`, :meth:`.Resource.post` etc...) in order to allow them to apply any more fine grained permission checking at the point the response is being generated.
This function must be overridden to be implemented.

View File

@ -1,5 +1,9 @@
Emitters
========
:mod:`emitters`
===============
.. module:: emitters
The emitters module provides a set of emitters that can be plugged in to a :class:`.Resource`. An emitter is responsible for taking the output of a and serializing it to a given media type. A :class:`.Resource` can have a number of emitters, allow the same content to be serialized in a number of different formats depending on the requesting client's preferences, as specified in the HTTP Request's Accept header.
.. automodule:: emitters
:members:

View File

@ -171,13 +171,11 @@ class XMLEmitter(BaseEmitter):
class DocumentingHTMLEmitter(DocumentingTemplateEmitter):
media_type = 'text/html'
uses_forms = True
template = 'emitter.html'
class DocumentingXHTMLEmitter(DocumentingTemplateEmitter):
media_type = 'application/xhtml+xml'
uses_forms = True
template = 'emitter.html'