コード例 #1
0
ファイル: views.py プロジェクト: portyaninoleh/steelkiwi
 def post(self, request):
     if request.POST.get('response', False):
         response = Response()
         question = Question.objects.get(id=request.POST['question'])
         response.message = request.POST['response']
         response.question = question
         response.user = request.user
         response.save()
     return HttpResponseRedirect(request.META['HTTP_REFERER'])