Save the answer.

    GET parameters:
        html:
            turn on the HTML version of the API

    BODY
    json in following format:
    {
        "answer": #answer,                          -- for one answer
        "answers": [#answer, #answer, #answer ...]  -- for multiple answers
    }

    answer = {
        "answer_class": str,            -- class of answer to save (e.g., flashcard_answer)
        "response_time": int,           -- response time in milliseconds
        "meta": "str"                   -- optional information
        "time_gap": int                 -- waiting time in frontend in seconds
        ...                             -- other fields depending on aswer type
                                          (see from_json method of Django model class)
    }

def answer(request):
    """
    Save the answer.

    GET parameters:
        html:
            turn on the HTML version of the API

    BODY
    json in following format:
    {
        "answer": #answer,                          -- for one answer
        "answers": [#answer, #answer, #answer ...]  -- for multiple answers
    }

    answer = {
        "answer_class": str,            -- class of answer to save (e.g., flashcard_answer)
        "response_time": int,           -- response time in milliseconds
        "meta": "str"                   -- optional information
        "time_gap": int                 -- waiting time in frontend in seconds
        ...                             -- other fields depending on aswer type
                                          (see from_json method of Django model class)
    }
    """
    if request.method == 'GET':
        return render(request, 'models_answer.html', {}, help_text=answer.__doc__)
    elif request.method == 'POST':
        practice_filter = get_filter(request)
        practice_context = PracticeContext.objects.from_content(practice_filter)
        saved_answers = _save_answers(request, practice_context, True)
        return render_json(request, saved_answers, status=200, template='models_answer.html')
    else:
        return HttpResponseBadRequest("method %s is not allowed".format(request.method))