Removed the now-unused success_redirect() from the stored status in the Mia core application.

This commit is contained in:
依瑪貓 2020-08-08 10:17:11 +08:00
parent 8793e8bc79
commit 05dd0e61a0

View File

@ -25,23 +25,6 @@ from django.http import HttpResponseRedirect
from .utils import UrlBuilder
def success_redirect(request, url, success):
"""Redirects to a specific URL on error, with the status ID appended
as the query parameter "s". The status will be loaded with the
retrieve_status template tag.
Args:
request (HttpRequest): The request.
url (str): The destination URL.
success (str): The success text message.
Returns:
HttpResponseRedirect: The redirect response.
"""
status_id = _store(request, {"success": success})
return HttpResponseRedirect(str(UrlBuilder(url).query(s=status_id)))
def error_redirect(request, url, form):
"""Redirects to a specific URL on error, with the status ID appended
as the query parameter "s". The status will be loaded with the