Changes between Version 36 and Version 37 of GenshiTutorial
- Timestamp:
- Aug 30, 2007, 4:19:31 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GenshiTutorial
v36 v37 17 17 == Prerequisites == 18 18 19 First, make sure you have !CherryPy 3.0.x installed, as well as recent versions of [http://formencode.org/ FormEncode] , Genshi (obviously), and [http://pythonpaste.org/ Paste]. You can download and install those manually, or just use [http://peak.telecommunity.com/DevCenter/EasyInstall easy_install]:19 First, make sure you have !CherryPy 3.0.x installed, as well as recent versions of [http://formencode.org/ FormEncode] and obviously Genshi. You can download and install those manually, or just use [http://peak.telecommunity.com/DevCenter/EasyInstall easy_install]: 20 20 21 21 {{{ … … 23 23 $ easy_install FormEncode 24 24 $ easy_install Genshi 25 $ easy_install Paste26 25 }}} 27 26 … … 43 42 44 43 import cherrypy 45 from paste.evalexception.middleware import EvalException46 44 47 45 … … 57 55 58 56 def main(filename): 59 # Some global configuration; note that this could be moved into a configuration file 57 # Some global configuration; note that this could be moved into a 58 # configuration file 60 59 cherrypy.config.update({ 61 60 'request.throw_errors': True, … … 66 65 }) 67 66 68 # Initialize the application, and add EvalException for more helpful error messages 69 app = cherrypy.Application(Root(data)) 70 app.wsgiapp.pipeline.append(('paste_exc', EvalException)) 71 cherrypy.quickstart(app, '/', { 67 cherrypy.quickstart(Root(data), '/', { 72 68 '/media': { 73 69 'tools.staticdir.on': True, … … 134 130 import cherrypy 135 131 from genshi.template import TemplateLoader 136 from paste.evalexception.middleware import EvalException137 132 138 133 loader = TemplateLoader(