Fix view decorators docs

This commit is contained in:
Grey Li 2021-05-21 17:46:31 +08:00 committed by Phil Jones
parent a82cc31af8
commit a541c2ac8b

View file

@ -142,7 +142,7 @@ Here is the code for that decorator::
def decorated_function(*args, **kwargs): def decorated_function(*args, **kwargs):
template_name = template template_name = template
if template_name is None: if template_name is None:
template_name = f"'{request.endpoint.replace('.', '/')}.html'" template_name = f"{request.endpoint.replace('.', '/')}.html"
ctx = f(*args, **kwargs) ctx = f(*args, **kwargs)
if ctx is None: if ctx is None:
ctx = {} ctx = {}