comparison piecrust/serving.py @ 53:73956224eb67

Setup the server better.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 25 Aug 2014 08:45:44 -0700
parents 2f717f961996
children 7f00176a3b4d
comparison
equal deleted inserted replaced
52:e52241394791 53:73956224eb67
74 logger.error("Only GET requests are allowed, got %s" % request.method) 74 logger.error("Only GET requests are allowed, got %s" % request.method)
75 raise MethodNotAllowed() 75 raise MethodNotAllowed()
76 76
77 # Create the app for this request. 77 # Create the app for this request.
78 app = PieCrust(root_dir=self.root_dir, debug=self.debug) 78 app = PieCrust(root_dir=self.root_dir, debug=self.debug)
79 app.config.set('site/root', '/')
80 app.config.set('site/pretty_urls', True)
81 app.config.set('server/is_serving', True)
79 82
80 # We'll serve page assets directly from where they are. 83 # We'll serve page assets directly from where they are.
81 app.env.base_asset_url_format = '/_asset/%path%' 84 app.env.base_asset_url_format = '/_asset/%path%'
82 85
83 # See if the requested URL is an asset. 86 # See if the requested URL is an asset.