Replaced HttpResponseRedirect with the redirect() shortcut.

This commit is contained in:
2020-08-09 19:05:57 +08:00
parent 550e44d93a
commit 828e407c03
2 changed files with 16 additions and 21 deletions
accounting
mia_core

@ -21,6 +21,7 @@
import random
from django.http import HttpResponseRedirect
from django.shortcuts import redirect
from .utils import UrlBuilder
@ -41,7 +42,7 @@ def error_redirect(request, url, post):
HttpResponseRedirect: The redirect response.
"""
post_id = _store(request, post)
return HttpResponseRedirect(str(UrlBuilder(url).query(s=post_id)))
return redirect(str(UrlBuilder(url).query(s=post_id)))
def get_previous_post(request):