Changeset 3318

Show
Ignore:
Timestamp:
07/19/07 13:04:39 (10 months ago)
Author:
chrisz
Message:

Output format must not be set for other templating engines than Kid, and needs not be set for Kid either. Removed unnecessary imports.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0/turbogears/view/base.py

    r3287 r3318  
    11"""Template processing for TurboGears view templates.""" 
    22 
    3 import os 
    4 import imp 
    53import sys 
    64import re 
     
    4341            if callable(value): 
    4442                dict[key] = print_warning(value) 
    45         return type.__new__(cls,name, bases, dict) 
     43        return type.__new__(cls, name, bases, dict) 
    4644 
    4745class DeprecatedVariableProviders(list): 
     
    9795 
    9896 
    99 def render(info, template=None, format=None ,content_type=None, mapping=None, fragment=False): 
     97def render(info, template=None, format=None, content_type=None, mapping=None, fragment=False): 
    10098    """Renders data in the desired format. 
    10199 
     
    126124    cherrypy.response.headers["Content-Type"] = content_type 
    127125    if not format: 
    128         format = config.get("%s.outputformat" % enginename, "html default") 
     126        format = config.get("%s.outputformat" % enginename, "html") 
    129127    args, kw = adapt_call(engine.render, args= [], 
    130128                kw = dict(info=info, format=format, fragment=fragment, template=template, mapping=mapping), start=1) 
     
    172170    """ 
    173171    value = None 
    174     def __init__(self,iterable): 
     172    def __init__(self, iterable): 
    175173        self._cycle = icycle(iterable) 
    176174    def __str__(self): 
     
    344342def load_engines(): 
    345343    config = turbogears.config 
    346     engine_options =
     344    engine_options =
    347345        "mako.directories" : config.get("mako.directories", []), 
    348346        "mako.output_encoding" : config.get("mako.output_encoding", "utf-8"),