registrasion/views.py
def badge(request, user_id):
    ''' Renders a single user's badge (SVG). '''

    user_id = int(user_id)
    user = User.objects.get(pk=user_id)

    rendered = render_badge(user)
    response = HttpResponse(rendered)

    response["Content-Type"] = "image/svg+xml"
    response["Content-Disposition"] = 'inline; filename="badge.svg"'
    return response
def badge(request, user_id):
    ''' Renders a single user's badge (SVG). '''

    user_id = int(user_id)
    user = User.objects.get(pk=user_id)

    rendered = render_badge(user)
    response = HttpResponse(rendered)

    response["Content-Type"] = "image/svg+xml"
    response["Content-Disposition"] = 'inline; filename="badge.svg"'
    return response
Renders a single user's badge (SVG).