def submitFeedback(request): d = {} try: if request.method == "POST" : f = Feedback() f.email = request.POST['email'] f.username = request.POST['name'] f.message = request.POST['body'] f.save() deliverEmail("feedbacksubject.html","feedbackmessage.html",{'f':f},getAlumClubAdminEmail()) except: d['error'] = "oops........some problem at the server end" json = simplejson.dumps(d) return HttpResponse(json)
def submitFeedback(request): d = {} try: if request.method == "POST": f = Feedback() f.email = request.POST['email'] f.username = request.POST['name'] f.message = request.POST['body'] f.save() deliverEmail("feedbacksubject.html", "feedbackmessage.html", {'f': f}, getAlumClubAdminEmail()) except: d['error'] = "oops........some problem at the server end" json = simplejson.dumps(d) return HttpResponse(json)