comparison piecrust/serving/middlewares.py @ 853:f070a4fc033c

core: Continue PieCrust3 refactor, simplify pages. The asset pipeline is still the only function pipeline at this point. * No more `QualifiedPage`, and several other pieces of code deleted. * Data providers are simpler and more focused. For instance, the page iterator doesn't try to support other types of items. * Route parameters are proper known source metadata to remove the confusion between the two. * Make the baker and pipeline more correctly manage records and record histories. * Add support for record collapsing and deleting stale outputs in the asset pipeline.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 21 May 2017 00:06:59 -0700
parents 4850f8c21b6e
children 33a89139c284
comparison
equal deleted inserted replaced
852:4850f8c21b6e 853:f070a4fc033c
87 except (RouteNotFoundError, PageNotFoundError): 87 except (RouteNotFoundError, PageNotFoundError):
88 pass 88 pass
89 if not found: 89 if not found:
90 return NotFound("No such page: %s" % page_path) 90 return NotFound("No such page: %s" % page_path)
91 91
92 ctx = DataBuildingContext(req_page.qualified_page, 92 ctx = DataBuildingContext(req_page.page,
93 page_num=req_page.page_num) 93 sub_num=req_page.sub_num)
94 data = build_page_data(ctx) 94 data = build_page_data(ctx)
95 95
96 var_path = request.args.getlist('var') 96 var_path = request.args.getlist('var')
97 if not var_path: 97 if not var_path:
98 var_path = None 98 var_path = None