comparison piecrust/data/assetor.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 fddaf43424e2
comparison
equal deleted inserted replaced
852:4850f8c21b6e 853:f070a4fc033c
31 '%uri%': uri}) 31 '%uri%': uri})
32 32
33 return base_url.rstrip('/') + '/' 33 return base_url.rstrip('/') + '/'
34 34
35 35
36 class Assetor(object): 36 class Assetor:
37 debug_render_doc = """Helps render URLs to files in the current page's 37 debug_render_doc = """Helps render URLs to files in the current page's
38 asset folder.""" 38 asset folder."""
39 debug_render = [] 39 debug_render = []
40 debug_render_dynamic = ['_debugRenderAssetNames'] 40 debug_render_dynamic = ['_debugRenderAssetNames']
41 41
42 def __init__(self, page, uri): 42 def __init__(self, page):
43 self._page = page 43 self._page = page
44 self._uri = uri
45 self._cache = None 44 self._cache = None
46 45
47 def __getattr__(self, name): 46 def __getattr__(self, name):
48 try: 47 try:
49 self._cacheAssets() 48 self._cacheAssets()