Package Pyblosxom :: Package renderers :: Module blosxom :: Class BlosxomRenderer
[show private | hide private]
[frames | no frames]

Class BlosxomRenderer

RendererBase --+
               |
              BlosxomRenderer

Known Subclasses:
Renderer

This is the default blosxom renderer. It tries to match the behavior of the blosxom renderer.
Method Summary
  __init__(self, request, stdoutput)
Constructor: Initializes the Renderer
  getContent(self)
Return the content field
  outputTemplate(self, output, entry, template_name, override)
Find the flavour template for template_name, run any blosxom callbacks, substitute entry into it and append the template to the output.
  render(self, header)
Figures out flavours and such and then renders the content according to which flavour we're using.
    Inherited from RendererBase
  addHeader(self, *args)
Populates the HTTP header with lines of text
  needsContentType(self, flag)
Use the renderer to determine 'Content-Type: x/x' default is to use the renderer for Content-Type, set flag to None to indicate no Content-Type generation.
  setContent(self, content)
Sets the content
  showHeaders(self)
Updated the headers of the Response instance.
  write(self, data)
Convenience method for programs to use instead of accessing self._out.write()

Method Details

__init__(self, request, stdoutput=<epydoc.imports._DevNull instance at 0x4021768c>)
(Constructor)

Constructor: Initializes the Renderer
Parameters:
request - The Pyblosxom.pyblosxom.Request object
           (type=Pyblosxom.pyblosxom.Request object)
stdoutput - File like object to print to.
           (type=file)
Overrides:
Pyblosxom.renderers.base.RendererBase.__init__ (inherited documentation)

getContent(self)

Return the content field

This is exposed for blosxom callbacks.
Returns:
content

outputTemplate(self, output, entry, template_name, override=0)

Find the flavour template for template_name, run any blosxom callbacks, substitute entry into it and append the template to the output.

If the entry has a "template_name" property and override is 1 (this happens in the story template), then we'll use that template instead.
Parameters:
output - list of strings of the output
           (type=list)
entry - the entry to render with this flavour template
           (type=Pyblosxom.entries.base.EntryBase)
template_name - name of the flavour template to use
           (type=string)
override - whether (1) or not (0) this template can be overriden with the "template_name" property of the entry
           (type=boolean)

render(self, header=1)

Figures out flavours and such and then renders the content according to which flavour we're using.
Parameters:
header - whether (1) or not (0) to render the HTTP headers
           (type=boolean)
Overrides:
Pyblosxom.renderers.base.RendererBase.render

Generated by Epydoc 2.1 on Tue Feb 7 21:43:58 2006 http://epydoc.sf.net