@login_required
def unflag(request, slug, app_label, model, object_id,
        template_name='flagging/unflag_confirm.html',
        success_template_name='flagging/unflag_success.html'):
    flag_type = get_object_or_404(FlagType, slug=slug)
    content_type = ContentType.objects.get(app_label=app_label, model=model)
    model = content_type.model_class()
    obj = model.objects.get(pk=object_id)
    if request.method == 'POST':
        flag = Flag.objects.get(flag_type=flag_type, content_type=content_type,
                object_id=obj.pk, user=request.user)
        flag.delete()
        if request.is_ajax():
            response = {'success': 'Success'}
            return HttpResponse(json.dumps(response), mimetype="application/json")
        if request.GET.get('next', None):
            return HttpResponseRedirect(request.GET['next'])
        template_name = success_template_name
    return render_to_response(template_name, {
        'object': obj,
        'next': request.GET.get('next', None),
        'flag_type': flag_type
    }, context_instance=RequestContext(request))
Ensure that we received a HTTP `101` status code in
dataset/ETHPy150Open nathanborror/django-basic-apps/basic/flagging/views.py/unflag--crossover with--dataset/ETHPy150Open Lawouach/WebSocket-for-Python/ws4py/client/__init__.py/WebSocketBaseClient.process_response_line