@require_GET
@json_response
def get_header(request):
    form = GetRequestValidationForm(request.GET)
    if not form.is_valid():
        return HttpResponseBadRequest(
            form.errors % _('could not get comments, errors: %s')
        )

    domain_name = form.cleaned_data['domain']
    thread_id = form.cleaned_data['thread']

    try:
        site = Site.objects.get(domain=domain_name)
    except Site.DoesNotExist:
        return HttpResponseBadRequest(
            _('domain with name %s does not exist') % domain_name
        )

    thread, created = site.threads.get_or_create(id=thread_id)

    resp = render(request, "header.html", {'thread': thread})

    return {"html": resp.content, "html_container_name": "comments_header"}
dataset/ETHPy150Open c4all/c4all/comments/views.py/get_header/swapped operands of `%`