Mercurial > piecrust2
comparison piecrust/serving/server.py @ 922:b447c24bc8d4
Merge changes from PieCrust2 branch.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Fri, 29 Sep 2017 17:05:09 -0700 |
parents | 33a89139c284 e053a27e5aae |
children | 45ad976712ec |
comparison
equal
deleted
inserted
replaced
921:628d639bb30b | 922:b447c24bc8d4 |
---|---|
127 offset = len(self.root_url) | 127 offset = len(self.root_url) |
128 rel_req_path = request.path[offset:].replace('/', os.sep) | 128 rel_req_path = request.path[offset:].replace('/', os.sep) |
129 if request.path.startswith('/_cache/'): | 129 if request.path.startswith('/_cache/'): |
130 # Some stuff needs to be served directly from the cache directory, | 130 # Some stuff needs to be served directly from the cache directory, |
131 # like LESS CSS map files. | 131 # like LESS CSS map files. |
132 full_path = os.path.join(self.root_dir, rel_req_path) | 132 full_path = os.path.join(self.appfactory.root_dir, rel_req_path) |
133 else: | 133 else: |
134 full_path = os.path.join(self._out_dir, rel_req_path) | 134 full_path = os.path.join(self._out_dir, rel_req_path) |
135 | 135 |
136 try: | 136 try: |
137 return make_wrapped_file_response(environ, request, full_path) | 137 return make_wrapped_file_response(environ, request, full_path) |