Changeset 2402


Ignore:
Timestamp:
Aug 9, 2009, 6:45:30 PM (15 years ago)
Author:
quentin
Message:

Allow global imports to be specified for Mako templates

File:
1 edited

Legend:

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

    r2399 r2402  
    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.