Renamed the function of the retrieve_status() template tag to retrieve_status_tag() with alias to retrieve_status.

This commit is contained in:
依瑪貓 2020-07-28 22:19:26 +08:00
parent a0ec831310
commit 983f38d6f0

View File

@ -114,8 +114,8 @@ def url_keep_return(context, view_name, *args):
return str(UrlBuilder(url).set_param("r", context.request.GET.get("r")))
@register.simple_tag(takes_context=True)
def retrieve_status(context):
@register.simple_tag(takes_context=True, name="retrieve_status")
def retrieve_status_tag(context):
"""Returns the success message from the previously-stored status. The
success message is saved as "success", and the error messages are saved as
"errors" in the template variables.