from django.contrib import messages

def view(request):
    messages.success(request, 'Your data has been saved!')
HttpResponseRedirect(request.path)
How do I pass template context information when using HttpResponseRedirect in Django?