Commit 5d3d5489 by Bridger Maxwell

Fixed more bugs with simplewiki template conversion. Now working as they originally were.

parent 1968d520
...@@ -21,30 +21,6 @@ import djangomako.middleware ...@@ -21,30 +21,6 @@ import djangomako.middleware
from mako.template import Template from mako.template import Template
from mako.lookup import TemplateLookup from mako.lookup import TemplateLookup
# def render_to_string(template_name, dictionary, context_instance=None):
# context_instance = context_instance or Context(dictionary)
# # add dictionary to context_instance
# context_instance.update(dictionary or {})
# # collapse context_instance to a single dictionary for mako
# context_dictionary = {}
# for d in context_instance:
# context_dictionary.update(d)
# # fetch and render template
# #template = djangomako.middleware.lookup.get_template(template_name)
# mylookup = TemplateLookup('/Users/bridger/Development/mitx_all/templates/')
# template = Template(filename='/Users/bridger/Development/mitx_all/templates/' + template_name, strict_undefined = True, lookup=mylookup)
# return template.render(**context_dictionary)
#
# def render_to_response(template_name, dictionary, context_instance=None, **kwargs):
# """
# Returns a HttpResponse whose content is filled with the result of calling
# lookup.get_template(args[0]).render with the passed arguments.
# """
# return HttpResponse(render_to_string(template_name, dictionary, context_instance), **kwargs)
from models import * from models import *
from settings import * from settings import *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment