def personal_word_remove(request, word): wordlist = PersonalWordlist(request.user.email) wordlist.remove_word(word) if request.is_ajax(): return HttpResponse('OK') url = request.META.get('HTTP_REFERER','/') return HttpResponseRedirect(url)
def personal_word_reviewed(request, word): wordlist = PersonalWordlist(request.user.email) wordlist._update_word(word, reviewed=True) if request.is_ajax(): snippet = "<li>OK, you'll be tested on this word soon!</li>" return HttpResponse(snippet) url = request.META.get('HTTP_REFERER','/') return HttpResponseRedirect(url)