Changeset 2673


Ignore:
Timestamp:
Dec 20, 2009, 9:44:30 PM (15 years ago)
Author:
broder
Message:

Allow global imports to be specified for Mako templates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/cherrypy-rebased/code/view.py

    r2670 r2673  
    3030   
    3131    def __call__(self, filename, directories, module_directory=None,
    32                  collection_size=-1, content_type='text/html; charset=utf-8'):
     32                 collection_size=-1, content_type='text/html; charset=utf-8',
     33                 imports=[]):
    3334        # Find the appropriate template lookup.
    3435        key = (tuple(directories), module_directory)
     
    4243                                    input_encoding='utf-8',
    4344                                    output_encoding='utf-8',
     45                                    imports=imports,
    4446                                    )
    4547            self.lookups[key] = lookup
Note: See TracChangeset for help on using the changeset viewer.