@@ -0,0 +1,1335 @@
+#!/usr/bin/env python2.5%0A#%0A# Copyright 2011 the Melange authors.%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A#   http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A%0A%22%22%22Module containing the boiler plate required to construct templates%0A%22%22%22%0A%0A__authors__ = %5B%0A  '%22Sverre Rabbelier%22 %3Csverre@rabbelier.nl%3E',%0A  %5D%0A%0A%0Afrom django.template import loader%0A%0A%0Aclass Template(object):%0A  %22%22%22Template class that facilitates the rendering of templates.%0A  %22%22%22%0A%0A  def render(self):%0A    %22%22%22Renders the template to a string.%0A%0A    Uses the context method to retrieve the appropriate context, uses the%0A    self.templatePath() method to retrieve the template that should be used.%0A    %22%22%22%0A%0A    context = self.context()%0A    rendered = loader.render_to_string(self.templatePath(), dictionary=context)%0A    return rendered%0A%0A  def context(self):%0A    %22%22%22Returns the context for the current template.%0A    %22%22%22%0A%0A    return %7B%7D%0A

Add a Template class for rendering templates