mirror of
https://github.com/donlon/cloudflare-error-page.git
synced 2025-12-19 14:59:28 +00:00
python: rename default_template -> base_template
This commit is contained in:
@@ -20,8 +20,7 @@ env = Environment(
|
||||
lstrip_blocks=True,
|
||||
)
|
||||
|
||||
# TODO: rename to base_template
|
||||
default_template: Template = env.get_template("error.html")
|
||||
base_template: Template = env.get_template("error.html")
|
||||
|
||||
|
||||
class ErrorPageParams(TypedDict):
|
||||
@@ -86,7 +85,7 @@ def render(params: ErrorPageParams,
|
||||
:return: The rendered error page as a string.
|
||||
'''
|
||||
if not template:
|
||||
template = default_template
|
||||
template = base_template
|
||||
|
||||
params = {**params}
|
||||
|
||||
@@ -108,4 +107,4 @@ def render(params: ErrorPageParams,
|
||||
return template.render(params=params, *args, **kwargs)
|
||||
|
||||
__version__ = "0.1.0"
|
||||
__all__ = ['default_template', 'render']
|
||||
__all__ = ['base_template', 'render']
|
||||
|
||||
@@ -4,7 +4,7 @@ from typing import Any
|
||||
|
||||
from cloudflare_error_page import (
|
||||
ErrorPageParams,
|
||||
default_template as base_template,
|
||||
base_template as base_template,
|
||||
render as render_cf_error_page,
|
||||
)
|
||||
from flask import current_app, request
|
||||
|
||||
Reference in New Issue
Block a user