rename: page_file_resolver -> resolve_page_file
This commit is contained in:
@@ -17,7 +17,7 @@ md = markdown.Markdown(extensions=['meta'])
|
||||
@bp.route('/<path:path>')
|
||||
def display_page(path):
|
||||
"""Get the file contents of the requested path and render the file."""
|
||||
resolved_path = page_file_resolver(path)
|
||||
resolved_path = resolve_page_file(path)
|
||||
logger.debug("received request for path '%s', resolved to '%s'", path, resolved_path)
|
||||
try:
|
||||
with app.open_instance_resource(resolved_path, 'r') as entry_file:
|
||||
@@ -34,7 +34,7 @@ def display_page(path):
|
||||
return render_template('base.html', title=title, content=content, mtime=mtime.strftime('%Y-%m-%d %H:%M:%S %Z'))
|
||||
|
||||
|
||||
def page_file_resolver(path):
|
||||
def resolve_page_file(path):
|
||||
"""Manipulate the request path to find appropriate page file.
|
||||
|
||||
* convert dir requests to index files
|
||||
|
||||
Reference in New Issue
Block a user