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

view.py: fix long lines

File:
1 edited

Legend:

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

    r2723 r2724  
    1414    """Callable which processes a dictionary, returning the rendered body."""
    1515   
    16     def __init__(self, template, next_handler, content_type='text/html; charset=utf-8'):
     16    def __init__(self, template, next_handler,
     17                 content_type='text/html; charset=utf-8'):
    1718        self.template = template
    1819        self.next_handler = next_handler
     
    5253                 collection_size=-1, content_type='text/html; charset=utf-8',
    5354                 imports=[]):
    54         cherrypy.request.lookup = lookup = self.get_lookup(directories, module_directory,
    55                                                           collection_size, imports)
     55        cherrypy.request.lookup = lookup = self.get_lookup(
     56            directories, module_directory, collection_size, imports)
    5657        cherrypy.request.template = t = lookup.get_template(filename)
    57         cherrypy.request.handler = MakoHandler(t, cherrypy.request.handler, content_type)
     58        cherrypy.request.handler = MakoHandler(
     59            t, cherrypy.request.handler, content_type)
    5860
    5961cherrypy.tools.mako = cherrypy.Tool('on_start_resource', MakoLoader())
     
    102104        response.body = JSONEncoder().iterencode(response.body)
    103105
    104 cherrypy.tools.jsonify = cherrypy.Tool('before_finalize', jsonify_tool_callback, priority=30)
     106cherrypy.tools.jsonify = cherrypy.Tool('before_finalize',
     107                                       jsonify_tool_callback, priority=30)
    105108
    106109
     
    111114            "You are not authorized to access that resource")
    112115
    113 cherrypy.tools.require_login = cherrypy.Tool('on_start_resource', require_login, priority=150)
     116cherrypy.tools.require_login = cherrypy.Tool('on_start_resource',
     117                                             require_login, priority=150)
    114118
    115119
     
    120124                                 "You must submit this request with POST")
    121125
    122 cherrypy.tools.require_POST = cherrypy.Tool('on_start_resource', require_POST, priority=150)
     126cherrypy.tools.require_POST = cherrypy.Tool('on_start_resource',
     127                                            require_POST, priority=150)
    123128
    124129
     
    146151        cherrypy.request.login = user
    147152
    148 cherrypy.tools.remote_user_login = cherrypy.Tool('on_start_resource', remote_user_login, priority=50)
     153cherrypy.tools.remote_user_login = cherrypy.Tool('on_start_resource',
     154                                                 remote_user_login, priority=50)
    149155
    150156
     
    154160        cherrypy.request.state = State(cherrypy.request.login)
    155161
    156 cherrypy.tools.invirtwebstate = cherrypy.Tool('on_start_resource', invirtwebstate_init, priority=100)
     162cherrypy.tools.invirtwebstate = cherrypy.Tool('on_start_resource',
     163                                              invirtwebstate_init, priority=100)
    157164
    158165
    159166class View(object):
    160     _cp_config = {'tools.mako.directories': [os.path.join(os.path.dirname(__file__),'templates')]}
     167    _cp_config = {'tools.mako.directories':
     168                      [os.path.join(os.path.dirname(__file__),'templates')]}
Note: See TracChangeset for help on using the changeset viewer.