示例#1
0
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)  
示例#2
0
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)