Пример #1
0
def Success(request):
    if request.method == "POST":
        data = dict(request.POST.items())
    else:
        return redirect("/")

    data["base_url"] = request.build_absolute_uri()

    # Takes care of verifying data and emailing
    context = verify_data(data)

    if context["verified"] == "yes":
        return render_to_response("success.html", context, context_instance=RequestContext(request))
    else:
        return render_to_response("wrong_order.html", context, context_instance=RequestContext(request))
Пример #2
0
 def process(self, data):
     context = verify_data(data)
     return render_to_response("success.html", context, context_instance=RequestContext(request))